3 // --------------------------------------------------
5 // Make the div behave like a button
10 vertical-align: middle; // match .btn alignment given font-size hack above
14 // Bring the "active" button to the front
24 // Prevent double borders when buttons are next to each other
29 .btn-group + .btn-group {
34 // Optional: Group multiple button groups together for a toolbar
36 margin-left: -5px; // Offset the first child's margin
51 .btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
55 // Set corners individual because sometimes a single button can be in a .btn-group and we need :first-child and :last-child to both match
56 .btn-group > .btn:first-child {
58 &:not(:last-child):not(.dropdown-toggle) {
59 @include border-right-radius(0);
63 // Need .dropdown-toggle since :last-child doesn't apply given a .dropdown-menu immediately after it
64 .btn-group > .btn:last-child:not(:first-child),
65 .btn-group > .dropdown-toggle:not(:first-child) {
66 @include border-left-radius(0);
69 // Custom edits for including btn-groups within btn-groups (useful for including dropdown buttons within a btn-group)
70 .btn-group > .btn-group {
74 .btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {
78 .btn-group > .btn-group:first-child:not(:last-child) {
81 @include border-right-radius(0);
85 .btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child {
86 @include border-left-radius(0);
89 // On active and open, don't show outline
90 .btn-group .dropdown-toggle:active,
91 .btn-group.open .dropdown-toggle {
99 // Split button dropdowns
100 // ----------------------
102 // Give the line between buttons some depth
103 .btn-group > .btn + .dropdown-toggle {
108 .btn-group > .btn-lg + .dropdown-toggle {
113 // The clickable button for toggling the menu
114 // Remove the gradient and set the same inset shadow as the :active state
115 .btn-group.open .dropdown-toggle {
116 @include box-shadow(inset 0 3px 5px rgba(0, 0, 0, .125));
118 // Show no shadow for `.btn-link` since it has no other button styles.
120 @include box-shadow(none);
124 // Reposition the caret
129 // Carets in other button sizes
131 border-width: $caret-width-large $caret-width-large 0;
132 border-bottom-width: 0;
135 // Upside down carets for .dropup
136 .dropup .btn-lg .caret {
137 border-width: 0 $caret-width-large $caret-width-large;
140 // Vertical button groups
141 // ----------------------
143 .btn-group-vertical {
146 > .btn-group > .btn {
153 // Clear floats so dropdown menus can be properly placed
164 > .btn-group + .btn-group {
170 .btn-group-vertical > .btn {
171 &:not(:first-child):not(:last-child) {
174 &:first-child:not(:last-child) {
175 border-top-right-radius: $btn-border-radius-base;
176 @include border-bottom-radius(0);
178 &:last-child:not(:first-child) {
179 border-bottom-left-radius: $btn-border-radius-base;
180 @include border-top-radius(0);
184 .btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {
188 .btn-group-vertical > .btn-group:first-child:not(:last-child) {
191 @include border-bottom-radius(0);
195 .btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {
196 @include border-top-radius(0);
199 // Justified button groups
200 // ----------------------
202 .btn-group-justified {
206 border-collapse: separate;
217 > .btn-group .dropdown-menu {
222 // Checkbox and radio options
224 // In order to support the browser's form validation feedback, powered by the
225 // `required` attribute, we have to "hide" the inputs via `clip`. We cannot use
226 // `display: none;` or `visibility: hidden;` as that also hides the popover.
227 // Simply visually hiding the inputs via `opacity` would leave them clickable in
228 // certain cases which is prevented by using `clip` and `pointer-events`.
229 // This way, we ensure a DOM element is visible to position the popover from.
231 // See https://github.com/twbs/bootstrap/pull/12794 and
232 // https://github.com/twbs/bootstrap/pull/14559 for more information.
234 [data-toggle="buttons"] {
236 > .btn-group > .btn {
238 input[type="checkbox"] {
240 clip: rect(0, 0, 0, 0);
241 pointer-events: none;