3 // --------------------------------------------------
5 // Dropdown arrow/caret
11 vertical-align: middle;
12 border-top: $caret-width-base dashed;
13 border-top: $caret-width-base solid \9; // IE8
14 border-right: $caret-width-base solid transparent;
15 border-left: $caret-width-base solid transparent;
18 // The dropdown wrapper (div)
24 // Prevent the focus on the dropdown toggle when closing dropdowns
25 .dropdown-toggle:focus {
29 // The dropdown menu (ul)
34 z-index: $zindex-dropdown;
35 display: none; // none by default, but block on "open" of the menu
39 margin: 2px 0 0; // override default ul
41 font-size: $font-size-base;
42 text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer)
43 background-color: $dropdown-bg;
44 border: 1px solid $dropdown-fallback-border; // IE8 fallback
45 border: 1px solid $dropdown-border;
46 border-radius: $border-radius-base;
47 @include box-shadow(0 6px 12px rgba(0, 0, 0, .175));
48 background-clip: padding-box;
50 // Aligns the dropdown menu to right
52 // Deprecated as of 3.1.0 in favor of `.dropdown-menu-[dir]`
58 // Dividers (basically an hr) within the dropdown
60 @include nav-divider($dropdown-divider-bg);
63 // Links within the dropdown menu
69 line-height: $line-height-base;
70 color: $dropdown-link-color;
71 white-space: nowrap; // prevent links from randomly breaking onto new lines
76 .dropdown-menu > li > a {
79 text-decoration: none;
80 color: $dropdown-link-hover-color;
81 background-color: $dropdown-link-hover-bg;
86 .dropdown-menu > .active > a {
90 color: $dropdown-link-active-color;
91 text-decoration: none;
93 background-color: $dropdown-link-active-bg;
99 // Gray out text and ensure the hover/focus state remains gray
101 .dropdown-menu > .disabled > a {
105 color: $dropdown-link-disabled-color;
108 // Nuke hover/focus effects
111 text-decoration: none;
112 background-color: transparent;
113 background-image: none; // Remove CSS gradient
114 @include reset-filter;
115 cursor: $cursor-disabled;
119 // Open state for the dropdown
126 // Remove the outline when :focus is triggered
134 // Add extra class to `.dropdown-menu` to flip the alignment of the dropdown
135 // menu with the parent.
136 .dropdown-menu-right {
137 left: auto; // Reset the default from `.dropdown-menu`
141 // With v3, we enabled auto-flipping if you have a dropdown within a right
142 // aligned nav component. To enable the undoing of that, we provide an override
143 // to restore the default dropdown menu alignment.
145 // This is only for left-aligning a dropdown menu within a `.navbar-right` or
146 // `.pull-right` nav component.
147 .dropdown-menu-left {
152 // Dropdown section headers
156 font-size: $font-size-small;
157 line-height: $line-height-base;
158 color: $dropdown-header-color;
159 white-space: nowrap; // as with > li > a
162 // Backdrop to catch body clicks on mobile, etc.
169 z-index: ($zindex-dropdown - 10);
172 // Right aligned dropdowns
173 .pull-right > .dropdown-menu {
178 // Allow for dropdowns to go bottom up (aka, dropup-menu)
180 // Just add .dropup after the standard .dropdown class and you're set, bro.
181 // TODO: abstract this so that the navbar fixed styles are not placed here?
184 .navbar-fixed-bottom .dropdown {
188 border-bottom: $caret-width-base dashed;
189 border-bottom: $caret-width-base solid \9; // IE8
192 // Different positioning for bottom up menu
200 // Component alignment
202 // Reiterate per navbar.less and the modified component alignment there.
204 @media (min-width: $grid-float-breakpoint) {
210 // Necessary for overrides of the default right aligned menu.
211 // Will remove come v4 in all likelihood.
212 .dropdown-menu-left {