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
27
// Optional: Group multiple button groups together for a toolbar
31
justify-content: flex-start;
39
// Prevent double borders when buttons are next to each other
40
> .btn:not(:first-child),
41
> .btn-group:not(:first-child) {
42
margin-left: -$btn-border-width;
45
// Reset rounded corners
46
> .btn:not(:last-child):not(.dropdown-toggle),
47
> .btn-group:not(:last-child) > .btn {
48
@include border-right-radius(0);
51
> .btn:not(:first-child),
52
> .btn-group:not(:first-child) > .btn {
53
@include border-left-radius(0);
59
// Remix the default button sizing classes into new ones for easier manipulation.
61
.btn-group-sm > .btn { @extend .btn-sm; }
62
.btn-group-lg > .btn { @extend .btn-lg; }
66
// Split button dropdowns
69
.dropdown-toggle-split {
70
padding-right: $btn-padding-x * .75;
71
padding-left: $btn-padding-x * .75;
84
.btn-sm + .dropdown-toggle-split {
85
padding-right: $btn-padding-x-sm * .75;
86
padding-left: $btn-padding-x-sm * .75;
89
.btn-lg + .dropdown-toggle-split {
90
padding-right: $btn-padding-x-lg * .75;
91
padding-left: $btn-padding-x-lg * .75;
95
// The clickable button for toggling the menu
96
// Set the same inset shadow as the :active state
97
.btn-group.show .dropdown-toggle {
98
@include box-shadow($btn-active-box-shadow);
100
// Show no shadow for `.btn-link` since it has no other button styles.
102
@include box-shadow(none);
108
// Vertical button groups
112
flex-direction: column;
113
align-items: flex-start;
114
justify-content: center;
121
> .btn:not(:first-child),
122
> .btn-group:not(:first-child) {
123
margin-top: -$btn-border-width;
126
// Reset rounded corners
127
> .btn:not(:last-child):not(.dropdown-toggle),
128
> .btn-group:not(:last-child) > .btn {
129
@include border-bottom-radius(0);
132
> .btn:not(:first-child),
133
> .btn-group:not(:first-child) > .btn {
134
@include border-top-radius(0);
139
// Checkbox and radio options
141
// In order to support the browser's form validation feedback, powered by the
142
// `required` attribute, we have to "hide" the inputs via `clip`. We cannot use
143
// `display: none;` or `visibility: hidden;` as that also hides the popover.
144
// Simply visually hiding the inputs via `opacity` would leave them clickable in
145
// certain cases which is prevented by using `clip` and `pointer-events`.
146
// This way, we ensure a DOM element is visible to position the popover from.
148
// See https://github.com/twbs/bootstrap/pull/12794 and
149
// https://github.com/twbs/bootstrap/pull/14559 for more information.
153
> .btn-group > .btn {
154
margin-bottom: 0; // Override default `<label>` value
157
input[type="checkbox"] {
159
clip: rect(0, 0, 0, 0);
160
pointer-events: none;