1 // scss-lint:disable QualifyingElement
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 fron 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: -$input-btn-border-width;
35 // Optional: Group multiple button groups together for a toolbar
38 justify-content: flex-start;
45 .btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
49 // 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
50 .btn-group > .btn:first-child {
53 &:not(:last-child):not(.dropdown-toggle) {
54 @include border-right-radius(0);
57 // Need .dropdown-toggle since :last-child doesn't apply given a .dropdown-menu immediately after it
58 .btn-group > .btn:last-child:not(:first-child),
59 .btn-group > .dropdown-toggle:not(:first-child) {
60 @include border-left-radius(0);
63 // Custom edits for including btn-groups within btn-groups (useful for including dropdown buttons within a btn-group)
64 .btn-group > .btn-group {
67 .btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {
70 .btn-group > .btn-group:first-child:not(:last-child) {
73 @include border-right-radius(0);
76 .btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child {
77 @include border-left-radius(0);
80 // On active and open, don't show outline
81 .btn-group .dropdown-toggle:active,
82 .btn-group.open .dropdown-toggle {
89 // Remix the default button sizing classes into new ones for easier manipulation.
91 .btn-group-sm > .btn { @extend .btn-sm; }
92 .btn-group-lg > .btn { @extend .btn-lg; }
96 // Split button dropdowns
99 .btn + .dropdown-toggle-split {
100 padding-right: $btn-padding-x * .75;
101 padding-left: $btn-padding-x * .75;
108 .btn-sm + .dropdown-toggle-split {
109 padding-right: $btn-padding-x-sm * .75;
110 padding-left: $btn-padding-x-sm * .75;
113 .btn-lg + .dropdown-toggle-split {
114 padding-right: $btn-padding-x-lg * .75;
115 padding-left: $btn-padding-x-lg * .75;
119 // The clickable button for toggling the menu
120 // Remove the gradient and set the same inset shadow as the :active state
121 .btn-group.open .dropdown-toggle {
122 @include box-shadow($btn-active-box-shadow);
124 // Show no shadow for `.btn-link` since it has no other button styles.
126 @include box-shadow(none);
132 // Vertical button groups
135 .btn-group-vertical {
136 display: inline-flex;
137 flex-direction: column;
138 align-items: flex-start;
139 justify-content: center;
149 > .btn-group + .btn-group {
150 margin-top: -$input-btn-border-width;
155 .btn-group-vertical > .btn {
156 &:not(:first-child):not(:last-child) {
159 &:first-child:not(:last-child) {
160 @include border-bottom-radius(0);
162 &:last-child:not(:first-child) {
163 @include border-top-radius(0);
166 .btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {
169 .btn-group-vertical > .btn-group:first-child:not(:last-child) {
172 @include border-bottom-radius(0);
175 .btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {
176 @include border-top-radius(0);
180 // Checkbox and radio options
182 // In order to support the browser's form validation feedback, powered by the
183 // `required` attribute, we have to "hide" the inputs via `clip`. We cannot use
184 // `display: none;` or `visibility: hidden;` as that also hides the popover.
185 // Simply visually hiding the inputs via `opacity` would leave them clickable in
186 // certain cases which is prevented by using `clip` and `pointer-events`.
187 // This way, we ensure a DOM element is visible to position the popover from.
189 // See https://github.com/twbs/bootstrap/pull/12794 and
190 // https://github.com/twbs/bootstrap/pull/14559 for more information.
192 [data-toggle="buttons"] {
194 > .btn-group > .btn {
196 input[type="checkbox"] {
199 pointer-events: none;