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
22 // Remove focus outline when dropdown JS adds it after closing the menu
28 // Prevent double borders when buttons are next to each other
33 .btn-group + .btn-group {
38 // Optional: Group multiple button groups together for a toolbar
40 margin-left: -5px; // Offset the first child's margin
41 &:extend(.clearfix all);
54 .btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
58 // 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
59 .btn-group > .btn:first-child {
61 &:not(:last-child):not(.dropdown-toggle) {
62 .border-right-radius(0);
65 // Need .dropdown-toggle since :last-child doesn't apply given a .dropdown-menu immediately after it
66 .btn-group > .btn:last-child:not(:first-child),
67 .btn-group > .dropdown-toggle:not(:first-child) {
68 .border-left-radius(0);
71 // Custom edits for including btn-groups within btn-groups (useful for including dropdown buttons within a btn-group)
72 .btn-group > .btn-group {
75 .btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {
78 .btn-group > .btn-group:first-child {
81 .border-right-radius(0);
84 .btn-group > .btn-group:last-child > .btn:first-child {
85 .border-left-radius(0);
88 // On active and open, don't show outline
89 .btn-group .dropdown-toggle:active,
90 .btn-group.open .dropdown-toggle {
97 // Remix the default button sizing classes into new ones for easier manipulation.
99 .btn-group-xs > .btn { .btn-xs(); }
100 .btn-group-sm > .btn { .btn-sm(); }
101 .btn-group-lg > .btn { .btn-lg(); }
104 // Split button dropdowns
105 // ----------------------
107 // Give the line between buttons some depth
108 .btn-group > .btn + .dropdown-toggle {
112 .btn-group > .btn-lg + .dropdown-toggle {
117 // The clickable button for toggling the menu
118 // Remove the gradient and set the same inset shadow as the :active state
119 .btn-group.open .dropdown-toggle {
120 .box-shadow(inset 0 3px 5px rgba(0,0,0,.125));
122 // Show no shadow for `.btn-link` since it has no other button styles.
129 // Reposition the caret
133 // Carets in other button sizes
135 border-width: @caret-width-large @caret-width-large 0;
136 border-bottom-width: 0;
138 // Upside down carets for .dropup
139 .dropup .btn-lg .caret {
140 border-width: 0 @caret-width-large @caret-width-large;
144 // Vertical button groups
145 // ----------------------
147 .btn-group-vertical {
150 > .btn-group > .btn {
157 // Clear floats so dropdown menus can be properly placed
159 &:extend(.clearfix all);
168 > .btn-group + .btn-group {
174 .btn-group-vertical > .btn {
175 &:not(:first-child):not(:last-child) {
178 &:first-child:not(:last-child) {
179 border-top-right-radius: @border-radius-base;
180 .border-bottom-radius(0);
182 &:last-child:not(:first-child) {
183 border-bottom-left-radius: @border-radius-base;
184 .border-top-radius(0);
187 .btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {
190 .btn-group-vertical > .btn-group:first-child:not(:last-child) {
193 .border-bottom-radius(0);
196 .btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {
197 .border-top-radius(0);
202 // Justified button groups
203 // ----------------------
205 .btn-group-justified {
209 border-collapse: separate;
222 // Checkbox and radio options
223 [data-toggle="buttons"] > .btn > input[type="radio"],
224 [data-toggle="buttons"] > .btn > input[type="checkbox"] {