1 // The dropdown wrapper (`<div>`)
8 // Generate the caret automatically
17 z-index: $zindex-dropdown;
18 display: none; // none by default, but block on "open" of the menu
20 min-width: $dropdown-min-width;
21 padding: $dropdown-padding-y 0;
22 margin: $dropdown-spacer 0 0; // override default ul
23 font-size: $font-size-base; // Redeclare because nesting can cause inheritance issues
25 text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer)
27 background-color: $dropdown-bg;
28 background-clip: padding-box;
29 border: $dropdown-border-width solid $dropdown-border-color;
30 @include border-radius($dropdown-border-radius);
31 @include box-shadow($dropdown-box-shadow);
34 // Allow for dropdowns to go bottom up (aka, dropup-menu)
35 // Just add .dropup after the standard .dropdown class and you're set.
39 margin-bottom: $dropdown-spacer;
50 margin-left: $dropdown-spacer;
54 @include caret(right);
64 margin-right: $dropdown-spacer;
75 // Dividers (basically an `<hr>`) within the dropdown
77 @include nav-divider($dropdown-divider-bg);
80 // Links, buttons, and more within the dropdown menu
82 // `<button>`-specific styles are denoted with `// For <button>s`
85 width: 100%; // For `<button>`s
86 padding: $dropdown-item-padding-y $dropdown-item-padding-x;
88 font-weight: $font-weight-normal;
89 color: $dropdown-link-color;
90 text-align: inherit; // For `<button>`s
91 white-space: nowrap; // prevent links from randomly breaking onto new lines
92 background-color: transparent; // For `<button>`s
93 border: 0; // For `<button>`s
95 @include hover-focus {
96 color: $dropdown-link-hover-color;
97 text-decoration: none;
98 @include gradient-bg($dropdown-link-hover-bg);
103 color: $dropdown-link-active-color;
104 text-decoration: none;
105 @include gradient-bg($dropdown-link-active-bg);
110 color: $dropdown-link-disabled-color;
111 background-color: transparent;
112 // Remove CSS gradients if they're enabled
113 @if $enable-gradients {
114 background-image: none;
119 .dropdown-menu.show {
123 // Dropdown section headers
126 padding: $dropdown-padding-y $dropdown-item-padding-x;
127 margin-bottom: 0; // for use with heading elements
128 font-size: $font-size-sm;
129 color: $dropdown-header-color;
130 white-space: nowrap; // as with > li > a