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 {
97 // Remix the default button sizing classes into new ones for easier manipulation.
99 .btn-group-xs > .btn {
103 .btn-group-sm > .btn {
107 .btn-group-lg > .btn {
111 // Split button dropdowns
112 // ----------------------
114 // Give the line between buttons some depth
115 .btn-group > .btn + .dropdown-toggle {
120 .btn-group > .btn-lg + .dropdown-toggle {
125 // The clickable button for toggling the menu
126 // Remove the gradient and set the same inset shadow as the :active state
127 .btn-group.open .dropdown-toggle {
128 @include box-shadow(inset 0 3px 5px rgba(0, 0, 0, .125));
130 // Show no shadow for `.btn-link` since it has no other button styles.
132 @include box-shadow(none);
136 // Reposition the caret
141 // Carets in other button sizes
143 border-width: $caret-width-large $caret-width-large 0;
144 border-bottom-width: 0;
147 // Upside down carets for .dropup
148 .dropup .btn-lg .caret {
149 border-width: 0 $caret-width-large $caret-width-large;
152 // Vertical button groups
153 // ----------------------
155 .btn-group-vertical {
158 > .btn-group > .btn {
165 // Clear floats so dropdown menus can be properly placed
176 > .btn-group + .btn-group {
182 .btn-group-vertical > .btn {
183 &:not(:first-child):not(:last-child) {
186 &:first-child:not(:last-child) {
187 border-top-right-radius: $btn-border-radius-base;
188 @include border-bottom-radius(0);
190 &:last-child:not(:first-child) {
191 border-bottom-left-radius: $btn-border-radius-base;
192 @include border-top-radius(0);
196 .btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {
200 .btn-group-vertical > .btn-group:first-child:not(:last-child) {
203 @include border-bottom-radius(0);
207 .btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {
208 @include border-top-radius(0);
211 // Justified button groups
212 // ----------------------
214 .btn-group-justified {
218 border-collapse: separate;
229 > .btn-group .dropdown-menu {
234 // Checkbox and radio options
236 // In order to support the browser's form validation feedback, powered by the
237 // `required` attribute, we have to "hide" the inputs via `clip`. We cannot use
238 // `display: none;` or `visibility: hidden;` as that also hides the popover.
239 // Simply visually hiding the inputs via `opacity` would leave them clickable in
240 // certain cases which is prevented by using `clip` and `pointer-events`.
241 // This way, we ensure a DOM element is visible to position the popover from.
243 // See https://github.com/twbs/bootstrap/pull/12794 and
244 // https://github.com/twbs/bootstrap/pull/14559 for more information.
246 [data-toggle="buttons"] {
248 > .btn-group > .btn {
250 input[type="checkbox"] {
252 clip: rect(0, 0, 0, 0);
253 pointer-events: none;