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);
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 .border-right-radius(0);
62 // Need .dropdown-toggle since :last-child doesn't apply, given that a .dropdown-menu is used immediately after it
63 .btn-group > .btn:last-child:not(:first-child),
64 .btn-group > .dropdown-toggle:not(:first-child) {
65 .border-left-radius(0);
68 // Custom edits for including btn-groups within btn-groups (useful for including dropdown buttons within a btn-group)
69 .btn-group > .btn-group {
72 .btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {
75 .btn-group > .btn-group:first-child:not(:last-child) {
78 .border-right-radius(0);
81 .btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child {
82 .border-left-radius(0);
85 // On active and open, don't show outline
86 .btn-group .dropdown-toggle:active,
87 .btn-group.open .dropdown-toggle {
94 // Remix the default button sizing classes into new ones for easier manipulation.
96 .btn-group-xs > .btn { &:extend(.btn-xs); }
97 .btn-group-sm > .btn { &:extend(.btn-sm); }
98 .btn-group-lg > .btn { &:extend(.btn-lg); }
101 // Split button dropdowns
102 // ----------------------
104 // Give the line between buttons some depth
105 .btn-group > .btn + .dropdown-toggle {
109 .btn-group > .btn-lg + .dropdown-toggle {
114 // The clickable button for toggling the menu
115 // Remove the gradient and set the same inset shadow as the :active state
116 .btn-group.open .dropdown-toggle {
117 .box-shadow(inset 0 3px 5px rgba(0,0,0,.125));
119 // Show no shadow for `.btn-link` since it has no other button styles.
126 // Reposition the caret
130 // Carets in other button sizes
132 border-width: @caret-width-large @caret-width-large 0;
133 border-bottom-width: 0;
135 // Upside down carets for .dropup
136 .dropup .btn-lg .caret {
137 border-width: 0 @caret-width-large @caret-width-large;
141 // Vertical button groups
142 // ----------------------
144 .btn-group-vertical {
147 > .btn-group > .btn {
154 // Clear floats so dropdown menus can be properly placed
156 &:extend(.clearfix all);
165 > .btn-group + .btn-group {
171 .btn-group-vertical > .btn {
172 &:not(:first-child):not(:last-child) {
175 &:first-child:not(:last-child) {
176 .border-top-radius(@btn-border-radius-base);
177 .border-bottom-radius(0);
179 &:last-child:not(:first-child) {
180 .border-top-radius(0);
181 .border-bottom-radius(@btn-border-radius-base);
184 .btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {
187 .btn-group-vertical > .btn-group:first-child:not(:last-child) {
190 .border-bottom-radius(0);
193 .btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {
194 .border-top-radius(0);
198 // Justified button groups
199 // ----------------------
201 .btn-group-justified {
205 border-collapse: separate;
216 > .btn-group .dropdown-menu {
222 // Checkbox and radio options
224 // In order to support the browser's form validation feedback, powered by the
225 // `required` attribute, we have to "hide" the inputs via `clip`. We cannot use
226 // `display: none;` or `visibility: hidden;` as that also hides the popover.
227 // Simply visually hiding the inputs via `opacity` would leave them clickable in
228 // certain cases which is prevented by using `clip` and `pointer-events`.
229 // This way, we ensure a DOM element is visible to position the popover from.
231 // See https://github.com/twbs/bootstrap/pull/12794 and
232 // https://github.com/twbs/bootstrap/pull/14559 for more information.
234 [data-toggle="buttons"] {
236 > .btn-group > .btn {
238 input[type="checkbox"] {
241 pointer-events: none;