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
37 &:extend(.clearfix all);
50 .btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
54 // 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
55 .btn-group > .btn:first-child {
57 &:not(:last-child):not(.dropdown-toggle) {
58 .border-right-radius(0);
61 // Need .dropdown-toggle since :last-child doesn't apply given a .dropdown-menu immediately after it
62 .btn-group > .btn:last-child:not(:first-child),
63 .btn-group > .dropdown-toggle:not(:first-child) {
64 .border-left-radius(0);
67 // Custom edits for including btn-groups within btn-groups (useful for including dropdown buttons within a btn-group)
68 .btn-group > .btn-group {
71 .btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {
74 .btn-group > .btn-group:first-child:not(:last-child) {
77 .border-right-radius(0);
80 .btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child {
81 .border-left-radius(0);
84 // On active and open, don't show outline
85 .btn-group .dropdown-toggle:active,
86 .btn-group.open .dropdown-toggle {
93 // Remix the default button sizing classes into new ones for easier manipulation.
95 .btn-group-xs > .btn { &:extend(.btn-xs); }
96 .btn-group-sm > .btn { &:extend(.btn-sm); }
97 .btn-group-lg > .btn { &:extend(.btn-lg); }
100 // Split button dropdowns
101 // ----------------------
103 // Give the line between buttons some depth
104 .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 .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.
125 // Reposition the caret
129 // Carets in other button sizes
131 border-width: @caret-width-large @caret-width-large 0;
132 border-bottom-width: 0;
134 // Upside down carets for .dropup
135 .dropup .btn-lg .caret {
136 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
155 &:extend(.clearfix all);
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: @border-radius-base;
176 .border-bottom-radius(0);
178 &:last-child:not(:first-child) {
179 border-bottom-left-radius: @border-radius-base;
180 .border-top-radius(0);
183 .btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {
186 .btn-group-vertical > .btn-group:first-child:not(:last-child) {
189 .border-bottom-radius(0);
192 .btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {
193 .border-top-radius(0);
197 // Justified button groups
198 // ----------------------
200 .btn-group-justified {
204 border-collapse: separate;
215 > .btn-group .dropdown-menu {
221 // Checkbox and radio options
223 // In order to support the browser's form validation feedback, powered by the
224 // `required` attribute, we have to "hide" the inputs via `clip`. We cannot use
225 // `display: none;` or `visibility: hidden;` as that also hides the popover.
226 // Simply visually hiding the inputs via `opacity` would leave them clickable in
227 // certain cases which is prevented by using `clip` and `pointer-events`.
228 // This way, we ensure a DOM element is visible to position the popover from.
230 // See https://github.com/twbs/bootstrap/pull/12794 and
231 // https://github.com/twbs/bootstrap/pull/14559 for more information.
233 [data-toggle="buttons"] {
235 > .btn-group > .btn {
237 input[type="checkbox"] {
240 pointer-events: none;