2012-01-07 23:40:28 -05:00
|
|
|
// DROPDOWN MENUS
|
|
|
|
// --------------
|
|
|
|
|
2011-12-21 17:22:20 -05:00
|
|
|
// Use the .menu class on any <li> element within the topbar or ul.tabs and you'll get some superfancy dropdowns
|
|
|
|
.dropdown {
|
|
|
|
position: relative;
|
|
|
|
}
|
2012-01-28 14:21:39 -05:00
|
|
|
.dropdown-toggle {
|
2012-01-27 16:06:58 -05:00
|
|
|
// The caret makes the toggle a bit too tall in IE7
|
|
|
|
*margin-bottom: -3px;
|
|
|
|
}
|
2012-01-28 14:21:39 -05:00
|
|
|
.dropdown-toggle:active,
|
|
|
|
.open .dropdown-toggle {
|
|
|
|
outline: 0;
|
|
|
|
}
|
2012-01-07 06:45:24 -05:00
|
|
|
// Dropdown arrow/caret
|
|
|
|
.caret {
|
2011-12-21 17:22:20 -05:00
|
|
|
display: inline-block;
|
|
|
|
width: 0;
|
|
|
|
height: 0;
|
|
|
|
text-indent: -99999px;
|
2012-01-27 16:06:58 -05:00
|
|
|
// IE7 won't do the border trick if there's a text indent, but it doesn't
|
|
|
|
// do the content that text-indent is hiding, either, so we're ok.
|
|
|
|
*text-indent: 0;
|
2011-12-21 17:22:20 -05:00
|
|
|
vertical-align: top;
|
2012-01-07 06:45:24 -05:00
|
|
|
border-left: 4px solid transparent;
|
2011-12-21 17:22:20 -05:00
|
|
|
border-right: 4px solid transparent;
|
2012-01-21 18:24:06 -05:00
|
|
|
border-top: 4px solid @black;
|
2011-12-21 17:22:20 -05:00
|
|
|
.opacity(30);
|
2012-01-05 18:46:48 -05:00
|
|
|
content: "\2193";
|
2011-12-21 17:22:20 -05:00
|
|
|
}
|
2012-01-07 06:45:24 -05:00
|
|
|
.dropdown .caret {
|
|
|
|
margin-top: 8px;
|
|
|
|
margin-left: 2px;
|
|
|
|
}
|
2012-01-08 00:09:02 -05:00
|
|
|
.dropdown:hover .caret,
|
|
|
|
.open.dropdown .caret {
|
2011-12-21 17:22:20 -05:00
|
|
|
.opacity(100);
|
|
|
|
}
|
|
|
|
// The dropdown menu (ul)
|
|
|
|
.dropdown-menu {
|
|
|
|
position: absolute;
|
2012-01-18 08:02:18 -05:00
|
|
|
top: 100%;
|
2012-01-27 16:06:58 -05:00
|
|
|
left: 0;
|
2012-01-07 07:17:33 -05:00
|
|
|
z-index: @zindexDropdown;
|
2011-12-21 17:22:20 -05:00
|
|
|
float: left;
|
2012-01-07 06:45:24 -05:00
|
|
|
display: none; // none by default, but block on "open" of the menu
|
2011-12-21 17:22:20 -05:00
|
|
|
min-width: 160px;
|
2012-01-12 18:29:16 -05:00
|
|
|
padding: 4px 0;
|
2012-01-07 06:45:24 -05:00
|
|
|
margin: 0; // override default ul
|
|
|
|
list-style: none;
|
2011-12-21 17:22:20 -05:00
|
|
|
background-color: @white;
|
2012-01-15 14:26:06 -05:00
|
|
|
border-color: #ccc;
|
2012-01-12 18:29:16 -05:00
|
|
|
border-color: rgba(0,0,0,.2);
|
2011-12-21 17:22:20 -05:00
|
|
|
border-style: solid;
|
2012-01-07 06:45:24 -05:00
|
|
|
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;
|
2012-01-15 14:26:06 -05:00
|
|
|
*border-right-width: 2px;
|
|
|
|
*border-bottom-width: 2px;
|
2011-12-21 17:22:20 -05:00
|
|
|
|
2012-01-24 13:45:29 -05:00
|
|
|
// Allow for dropdowns to go bottom up (aka, dropup-menu)
|
|
|
|
&.bottom-up {
|
|
|
|
top: auto;
|
|
|
|
bottom: 100%;
|
|
|
|
margin-bottom: 2px;
|
|
|
|
}
|
|
|
|
|
2011-12-21 17:22:20 -05:00
|
|
|
// Dividers (basically an hr) within the dropdown
|
|
|
|
.divider {
|
2012-02-20 15:38:49 -05:00
|
|
|
.nav-divider();
|
2011-12-21 17:22:20 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
// Links within the dropdown menu
|
|
|
|
a {
|
|
|
|
display: block;
|
2012-01-13 13:07:56 -05:00
|
|
|
padding: 3px 15px;
|
2011-12-21 17:22:20 -05:00
|
|
|
clear: both;
|
|
|
|
font-weight: normal;
|
2012-02-07 03:16:05 -05:00
|
|
|
line-height: @baseLineHeight;
|
2011-12-21 17:22:20 -05:00
|
|
|
color: @gray;
|
2012-01-12 18:29:16 -05:00
|
|
|
white-space: nowrap;
|
2012-01-08 03:49:38 -05:00
|
|
|
}
|
2012-01-08 04:50:12 -05:00
|
|
|
}
|
2012-01-08 03:49:38 -05:00
|
|
|
|
2012-01-08 18:33:44 -05:00
|
|
|
// Hover state
|
2012-01-13 13:07:56 -05:00
|
|
|
.dropdown-menu li > a:hover,
|
2012-01-08 18:33:44 -05:00
|
|
|
.dropdown-menu .active > a,
|
|
|
|
.dropdown-menu .active > a:hover {
|
2012-01-21 18:24:06 -05:00
|
|
|
color: @white;
|
2012-01-13 13:07:56 -05:00
|
|
|
text-decoration: none;
|
|
|
|
background-color: @linkColor;
|
2012-01-08 18:33:44 -05:00
|
|
|
}
|
|
|
|
|
2011-12-21 17:22:20 -05:00
|
|
|
// Open state for the dropdown
|
|
|
|
.dropdown.open {
|
2012-01-27 16:06:58 -05:00
|
|
|
// IE7's z-index only goes to the nearest positioned ancestor, which would
|
|
|
|
// make the menu appear below buttons that appeared later on the page
|
|
|
|
*z-index: @zindexDropdown;
|
|
|
|
|
2011-12-21 17:22:20 -05:00
|
|
|
.dropdown-toggle {
|
|
|
|
color: @white;
|
|
|
|
background: #ccc;
|
|
|
|
background: rgba(0,0,0,.3);
|
|
|
|
}
|
|
|
|
.dropdown-menu {
|
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
}
|
2012-01-08 04:50:12 -05:00
|
|
|
|
2012-02-18 23:06:38 -05:00
|
|
|
// Right aligned dropdowns
|
|
|
|
.pull-right .dropdown-menu {
|
|
|
|
left: auto;
|
|
|
|
right: 0;
|
|
|
|
}
|
|
|
|
|
2012-01-08 04:50:12 -05:00
|
|
|
// Typeahead
|
|
|
|
.typeahead {
|
|
|
|
margin-top: 2px; // give it some space to breathe
|
|
|
|
.border-radius(4px);
|
|
|
|
}
|