3 // --------------------------------------------------
6 // Use the .menu class on any <li> element within the topbar or ul.tabs and you'll get some superfancy dropdowns
12 // The caret makes the toggle a bit too tall in IE7
15 .dropdown-toggle:active,
16 .open .dropdown-toggle {
20 // Dropdown arrow/caret
21 // --------------------
23 display: inline-block;
27 border-top: 4px solid @black;
28 border-right: 4px solid transparent;
29 border-left: 4px solid transparent;
39 // The dropdown menu (ul)
40 // ----------------------
45 z-index: @zindexDropdown;
46 display: none; // none by default, but block on "open" of the menu
50 margin: 2px 0 0; // override default ul
52 background-color: @dropdownBackground;
53 border: 1px solid #ccc; // Fallback for IE7-8
54 border: 1px solid @dropdownBorder;
55 *border-right-width: 2px;
56 *border-bottom-width: 2px;
58 .box-shadow(0 5px 10px rgba(0,0,0,.2));
59 -webkit-background-clip: padding-box;
60 -moz-background-clip: padding;
61 background-clip: padding-box;
63 // Aligns the dropdown menu to right
69 // Dividers (basically an hr) within the dropdown
71 .nav-divider(@dropdownDividerTop, @dropdownDividerBottom);
74 // Links within the dropdown menu
80 line-height: @baseLineHeight;
81 color: @dropdownLinkColor;
88 .dropdown-menu > li > a:hover,
89 .dropdown-menu > li > a:focus,
90 .dropdown-submenu:hover > a,
91 .dropdown-submenu:focus > a {
92 text-decoration: none;
93 color: @dropdownLinkColorHover;
94 #gradient > .vertical(@dropdownLinkBackgroundHover, darken(@dropdownLinkBackgroundHover, 5%));
99 .dropdown-menu > .active > a,
100 .dropdown-menu > .active > a:hover,
101 .dropdown-menu > .active > a:focus {
102 color: @dropdownLinkColorActive;
103 text-decoration: none;
105 #gradient > .vertical(@dropdownLinkBackgroundActive, darken(@dropdownLinkBackgroundActive, 5%));
110 // Gray out text and ensure the hover/focus state remains gray
111 .dropdown-menu > .disabled > a,
112 .dropdown-menu > .disabled > a:hover,
113 .dropdown-menu > .disabled > a:focus {
116 // Nuke hover/focus effects
117 .dropdown-menu > .disabled > a:hover,
118 .dropdown-menu > .disabled > a:focus {
119 text-decoration: none;
120 background-color: transparent;
121 background-image: none; // Remove CSS gradient
126 // Open state for the dropdown
127 // ---------------------------
129 // IE7's z-index only goes to the nearest positioned ancestor, which would
130 // make the menu appear below buttons that appeared later on the page
131 *z-index: @zindexDropdown;
138 // Right aligned dropdowns
139 // ---------------------------
140 .pull-right > .dropdown-menu {
145 // Allow for dropdowns to go bottom up (aka, dropup-menu)
146 // ------------------------------------------------------
147 // Just add .dropup after the standard .dropdown class and you're set, bro.
148 // TODO: abstract this so that the navbar fixed styles are not placed here?
150 .navbar-fixed-bottom .dropdown {
154 border-bottom: 4px solid @black;
157 // Different positioning for bottom up menu
166 // ---------------------------
171 .dropdown-submenu > .dropdown-menu {
176 .border-radius(0 6px 6px 6px);
178 .dropdown-submenu:hover > .dropdown-menu {
183 .dropup .dropdown-submenu > .dropdown-menu {
188 .border-radius(5px 5px 5px 0);
191 // Caret to indicate there is a submenu
192 .dropdown-submenu > a:after {
198 border-color: transparent;
200 border-width: 5px 0 5px 5px;
201 border-left-color: darken(@dropdownBackground, 20%);
205 .dropdown-submenu:hover > a:after {
206 border-left-color: @dropdownLinkColorHover;
209 // Left aligned submenus
210 .dropdown-submenu.pull-left {
212 // Yes, this is awkward since .pull-left adds a float, but it sticks to our conventions elsewhere.
215 // Positioning the submenu
219 .border-radius(6px 0 6px 6px);
225 // Increase padding from 15px to 20px on sides
226 .dropdown .dropdown-menu .nav-header {
235 margin-top: 2px; // give it some space to breathe
236 .border-radius(@baseBorderRadius);