1 // stylelint-disable selector-no-qualifying-type
3 // Make the div behave like a button
8 vertical-align: middle; // match .btn alignment given font-size hack above
14 // Bring the hover, focused, and "active" buttons to the front to overlay
15 // the borders properly
26 // Prevent double borders when buttons are next to each other
30 .btn-group + .btn-group {
31 margin-left: -$btn-border-width;
35 // Optional: Group multiple button groups together for a toolbar
39 justify-content: flex-start;
51 // Reset rounded corners
52 > .btn:not(:last-child):not(.dropdown-toggle),
53 > .btn-group:not(:last-child) > .btn {
54 @include border-right-radius(0);
57 > .btn:not(:first-child),
58 > .btn-group:not(:first-child) > .btn {
59 @include border-left-radius(0);
65 // Remix the default button sizing classes into new ones for easier manipulation.
67 .btn-group-sm > .btn { @extend .btn-sm; }
68 .btn-group-lg > .btn { @extend .btn-lg; }
72 // Split button dropdowns
75 .dropdown-toggle-split {
76 padding-right: $btn-padding-x * .75;
77 padding-left: $btn-padding-x * .75;
90 .btn-sm + .dropdown-toggle-split {
91 padding-right: $btn-padding-x-sm * .75;
92 padding-left: $btn-padding-x-sm * .75;
95 .btn-lg + .dropdown-toggle-split {
96 padding-right: $btn-padding-x-lg * .75;
97 padding-left: $btn-padding-x-lg * .75;
101 // The clickable button for toggling the menu
102 // Set the same inset shadow as the :active state
103 .btn-group.show .dropdown-toggle {
104 @include box-shadow($btn-active-box-shadow);
106 // Show no shadow for `.btn-link` since it has no other button styles.
108 @include box-shadow(none);
114 // Vertical button groups
117 .btn-group-vertical {
118 flex-direction: column;
119 align-items: flex-start;
120 justify-content: center;
130 > .btn-group + .btn-group {
131 margin-top: -$btn-border-width;
135 // Reset rounded corners
136 > .btn:not(:last-child):not(.dropdown-toggle),
137 > .btn-group:not(:last-child) > .btn {
138 @include border-bottom-radius(0);
141 > .btn:not(:first-child),
142 > .btn-group:not(:first-child) > .btn {
143 @include border-top-radius(0);
148 // Checkbox and radio options
150 // In order to support the browser's form validation feedback, powered by the
151 // `required` attribute, we have to "hide" the inputs via `clip`. We cannot use
152 // `display: none;` or `visibility: hidden;` as that also hides the popover.
153 // Simply visually hiding the inputs via `opacity` would leave them clickable in
154 // certain cases which is prevented by using `clip` and `pointer-events`.
155 // This way, we ensure a DOM element is visible to position the popover from.
157 // See https://github.com/twbs/bootstrap/pull/12794 and
158 // https://github.com/twbs/bootstrap/pull/14559 for more information.
162 > .btn-group > .btn {
163 margin-bottom: 0; // Override default `<label>` value
166 input[type="checkbox"] {
168 clip: rect(0, 0, 0, 0);
169 pointer-events: none;