1 |
|
2 |
|
3 |
|
4 | .btn-group,
|
5 | .btn-group-vertical {
|
6 | position: relative;
|
7 | display: inline-flex;
|
8 | vertical-align: middle;
|
9 |
|
10 | > .btn {
|
11 | position: relative;
|
12 | flex: 0 1 auto;
|
13 |
|
14 |
|
15 |
|
16 | @include hover {
|
17 | z-index: 1;
|
18 | }
|
19 | &:focus,
|
20 | &:active,
|
21 | &.active {
|
22 | z-index: 1;
|
23 | }
|
24 | }
|
25 |
|
26 |
|
27 | .btn + .btn,
|
28 | .btn + .btn-group,
|
29 | .btn-group + .btn,
|
30 | .btn-group + .btn-group {
|
31 | margin-left: -$btn-border-width;
|
32 | }
|
33 | }
|
34 |
|
35 |
|
36 | .btn-toolbar {
|
37 | display: flex;
|
38 | flex-wrap: wrap;
|
39 | justify-content: flex-start;
|
40 |
|
41 | .input-group {
|
42 | width: auto;
|
43 | }
|
44 | }
|
45 |
|
46 | .btn-group {
|
47 | > .btn:first-child {
|
48 | margin-left: 0;
|
49 | }
|
50 |
|
51 |
|
52 | > .btn:not(:last-child):not(.dropdown-toggle),
|
53 | > .btn-group:not(:last-child) > .btn {
|
54 | @include border-right-radius(0);
|
55 | }
|
56 |
|
57 | > .btn:not(:first-child),
|
58 | > .btn-group:not(:first-child) > .btn {
|
59 | @include border-left-radius(0);
|
60 | }
|
61 | }
|
62 |
|
63 |
|
64 |
|
65 |
|
66 |
|
67 | .btn-group-sm > .btn { @extend .btn-sm; }
|
68 | .btn-group-lg > .btn { @extend .btn-lg; }
|
69 |
|
70 |
|
71 |
|
72 |
|
73 |
|
74 |
|
75 | .dropdown-toggle-split {
|
76 | padding-right: $btn-padding-x * .75;
|
77 | padding-left: $btn-padding-x * .75;
|
78 |
|
79 | &::after,
|
80 | .dropup &::after,
|
81 | .dropright &::after {
|
82 | margin-left: 0;
|
83 | }
|
84 |
|
85 | .dropleft &::before {
|
86 | margin-right: 0;
|
87 | }
|
88 | }
|
89 |
|
90 | .btn-sm + .dropdown-toggle-split {
|
91 | padding-right: $btn-padding-x-sm * .75;
|
92 | padding-left: $btn-padding-x-sm * .75;
|
93 | }
|
94 |
|
95 | .btn-lg + .dropdown-toggle-split {
|
96 | padding-right: $btn-padding-x-lg * .75;
|
97 | padding-left: $btn-padding-x-lg * .75;
|
98 | }
|
99 |
|
100 |
|
101 |
|
102 |
|
103 | .btn-group.show .dropdown-toggle {
|
104 | @include box-shadow($btn-active-box-shadow);
|
105 |
|
106 |
|
107 | &.btn-link {
|
108 | @include box-shadow(none);
|
109 | }
|
110 | }
|
111 |
|
112 |
|
113 |
|
114 |
|
115 |
|
116 |
|
117 | .btn-group-vertical {
|
118 | flex-direction: column;
|
119 | align-items: flex-start;
|
120 | justify-content: center;
|
121 |
|
122 | .btn,
|
123 | .btn-group {
|
124 | width: 100%;
|
125 | }
|
126 |
|
127 | > .btn + .btn,
|
128 | > .btn + .btn-group,
|
129 | > .btn-group + .btn,
|
130 | > .btn-group + .btn-group {
|
131 | margin-top: -$btn-border-width;
|
132 | margin-left: 0;
|
133 | }
|
134 |
|
135 |
|
136 | > .btn:not(:last-child):not(.dropdown-toggle),
|
137 | > .btn-group:not(:last-child) > .btn {
|
138 | @include border-bottom-radius(0);
|
139 | }
|
140 |
|
141 | > .btn:not(:first-child),
|
142 | > .btn-group:not(:first-child) > .btn {
|
143 | @include border-top-radius(0);
|
144 | }
|
145 | }
|
146 |
|
147 |
|
148 |
|
149 |
|
150 |
|
151 |
|
152 |
|
153 |
|
154 |
|
155 |
|
156 |
|
157 |
|
158 |
|
159 |
|
160 | .btn-group-toggle {
|
161 | > .btn,
|
162 | > .btn-group > .btn {
|
163 | margin-bottom: 0;
|
164 |
|
165 | input[type="radio"],
|
166 | input[type="checkbox"] {
|
167 | position: absolute;
|
168 | clip: rect(0, 0, 0, 0);
|
169 | pointer-events: none;
|
170 | }
|
171 | }
|
172 | }
|