dropdowns.less 2.12 KB
Newer Older
1
2
3
// DROPDOWN MENUS
// --------------

4
5
6
7
// Use the .menu class on any <li> element within the topbar or ul.tabs and you'll get some superfancy dropdowns
.dropdown {
  position: relative;
}
8
9
// Dropdown arrow/caret
.caret {
10
11
12
13
14
  display: inline-block;
  width: 0;
  height: 0;
  text-indent: -99999px;
  vertical-align: top;
15
  border-left:  4px solid transparent;
16
  border-right: 4px solid transparent;
17
  border-top:   4px solid #000;
18
  .opacity(30);
19
  content: "\2193";
20
}
21
22
23
24
.dropdown .caret {
  margin-top: 8px;
  margin-left: 2px;
}
25
26
.dropdown:hover .caret,
.open.dropdown .caret {
27
28
29
30
31
32
  .opacity(100);
}
// The dropdown menu (ul)
.dropdown-menu {
  position: absolute;
  top: 40px;
33
  z-index: @zindexDropdown;
34
  float: left;
35
  display: none; // none by default, but block on "open" of the menu
36
37
38
  min-width: 160px;
  max-width: 220px;
  _width: 160px;
39
40
41
  padding: 5px 0;
  margin: 0; // override default ul
  list-style: none;
42
43
  background-color: @white;
  border-color: #999;
44
  border-color: rgba(0,0,0,.1);
45
  border-style: solid;
46
47
48
49
50
51
  border-width: 1px;
  .border-radius(0 0 5px 5px);
  .box-shadow(0 5px 10px rgba(0,0,0,.2));
  -webkit-background-clip: padding-box;
     -moz-background-clip: padding;
          background-clip: padding-box;
52
53
54
55
56
  zoom: 1; // do we need this?

  // Dividers (basically an hr) within the dropdown
  .divider {
    height: 1px;
57
    margin: 5px 1px;
58
    overflow: hidden;
59
    background-color: #e5e5e5;
60
61
62
63
64
65
    border-bottom: 1px solid @white;
  }

  // Links within the dropdown menu
  a {
    display: block;
66
    padding: 2px 15px;
67
68
69
70
71
72
    clear: both;
    font-weight: normal;
    line-height: 18px;
    color: @gray;
    // Hover state
    &:hover {
73
      color: #fff;
74
      text-decoration: none;
75
76
      text-shadow: 0 -1px 0 rgba(0,0,0,.25);
      #gradient > .vertical(@blue, @blueDark);
77
      #gradient > .vertical(@linkColor, darken(@linkColor, 5%));
78
      @shadow: inset 0 1px 0 rgba(0,0,0,.075), inset 0 -1px rgba(0,0,0,.075);
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
      .box-shadow(@shadow);
    }
  }
}

// Open state for the dropdown
.dropdown.open {
  .dropdown-toggle {
    color: @white;
    background: #ccc;
    background: rgba(0,0,0,.3);
  }
  .dropdown-menu {
    display: block;
  }
}