1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 | .form-control {
|
8 | display: block;
|
9 | width: 100%;
|
10 |
|
11 |
|
12 | padding: $input-padding-y $input-padding-x;
|
13 | font-size: $font-size-base;
|
14 | line-height: $input-line-height;
|
15 | color: $input-color;
|
16 | background-color: $input-bg;
|
17 |
|
18 | background-image: none;
|
19 | background-clip: padding-box;
|
20 | border: $input-btn-border-width solid $input-border-color;
|
21 |
|
22 |
|
23 | @if $enable-rounded {
|
24 |
|
25 | border-radius: $input-border-radius;
|
26 | } @else {
|
27 |
|
28 | border-radius: 0;
|
29 | }
|
30 |
|
31 | @include box-shadow($input-box-shadow);
|
32 | @include transition($input-transition);
|
33 |
|
34 |
|
35 | &::-ms-expand {
|
36 | background-color: transparent;
|
37 | border: 0;
|
38 | }
|
39 |
|
40 |
|
41 | @include form-control-focus();
|
42 |
|
43 |
|
44 | &::placeholder {
|
45 | color: $input-color-placeholder;
|
46 |
|
47 | opacity: 1;
|
48 | }
|
49 |
|
50 |
|
51 |
|
52 |
|
53 |
|
54 |
|
55 | &:disabled,
|
56 | &[readonly] {
|
57 | background-color: $input-bg-disabled;
|
58 |
|
59 | opacity: 1;
|
60 | }
|
61 |
|
62 | &:disabled {
|
63 | cursor: $cursor-disabled;
|
64 | }
|
65 | }
|
66 |
|
67 | select.form-control {
|
68 | &:not([size]):not([multiple]) {
|
69 | $select-border-width: ($border-width * 2);
|
70 | height: calc(#{$input-height} + #{$select-border-width});
|
71 | }
|
72 |
|
73 | &:focus::-ms-value {
|
74 | // Suppress the nested default white text on blue background highlight given to
|
75 | // the selected option text when the (still closed) <select> receives focus
|
76 | // in IE and (under certain conditions) Edge, as it looks bad and cannot be made to
|
77 | // match the appearance of the native widget.
|
78 | // See https://github.com/twbs/bootstrap/issues/19398.
|
79 | color: $input-color;
|
80 | background-color: $input-bg;
|
81 | }
|
82 | }
|
83 |
|
84 |
|
85 | .form-control-file,
|
86 | .form-control-range {
|
87 | display: block;
|
88 | }
|
89 |
|
90 |
|
91 |
|
92 |
|
93 |
|
94 |
|
95 |
|
96 |
|
97 | .col-form-label {
|
98 | padding-top: calc(#{$input-padding-y} - #{$input-btn-border-width} * 2);
|
99 | padding-bottom: calc(#{$input-padding-y} - #{$input-btn-border-width} * 2);
|
100 | margin-bottom: 0;
|
101 | }
|
102 |
|
103 | .col-form-label-lg {
|
104 | padding-top: calc(#{$input-padding-y-lg} - #{$input-btn-border-width} * 2);
|
105 | padding-bottom: calc(#{$input-padding-y-lg} - #{$input-btn-border-width} * 2);
|
106 | font-size: $font-size-lg;
|
107 | }
|
108 |
|
109 | .col-form-label-sm {
|
110 | padding-top: calc(#{$input-padding-y-sm} - #{$input-btn-border-width} * 2);
|
111 | padding-bottom: calc(#{$input-padding-y-sm} - #{$input-btn-border-width} * 2);
|
112 | font-size: $font-size-sm;
|
113 | }
|
114 |
|
115 |
|
116 |
|
117 |
|
118 |
|
119 |
|
120 |
|
121 |
|
122 | .col-form-legend {
|
123 | padding-top: $input-padding-y;
|
124 | padding-bottom: $input-padding-y;
|
125 | margin-bottom: 0;
|
126 | font-size: $font-size-base;
|
127 | }
|
128 |
|
129 |
|
130 |
|
131 |
|
132 |
|
133 |
|
134 |
|
135 | .form-control-static {
|
136 | padding-top: $input-padding-y;
|
137 | padding-bottom: $input-padding-y;
|
138 | margin-bottom: 0;
|
139 | line-height: $input-line-height;
|
140 | border: solid transparent;
|
141 | border-width: $input-btn-border-width 0;
|
142 |
|
143 | &.form-control-sm,
|
144 | &.form-control-lg {
|
145 | padding-right: 0;
|
146 | padding-left: 0;
|
147 | }
|
148 | }
|
149 |
|
150 |
|
151 |
|
152 |
|
153 |
|
154 |
|
155 |
|
156 |
|
157 |
|
158 |
|
159 | .form-control-sm {
|
160 | padding: $input-padding-y-sm $input-padding-x-sm;
|
161 | font-size: $font-size-sm;
|
162 | @include border-radius($input-border-radius-sm);
|
163 | }
|
164 |
|
165 | select.form-control-sm {
|
166 | &:not([size]):not([multiple]) {
|
167 | height: $input-height-sm;
|
168 | }
|
169 | }
|
170 |
|
171 | .form-control-lg {
|
172 | padding: $input-padding-y-lg $input-padding-x-lg;
|
173 | font-size: $font-size-lg;
|
174 | @include border-radius($input-border-radius-lg);
|
175 | }
|
176 |
|
177 | select.form-control-lg {
|
178 | &:not([size]):not([multiple]) {
|
179 | height: $input-height-lg;
|
180 | }
|
181 | }
|
182 |
|
183 |
|
184 |
|
185 |
|
186 |
|
187 |
|
188 |
|
189 | .form-group {
|
190 | margin-bottom: $form-group-margin-bottom;
|
191 | }
|
192 |
|
193 | .form-text {
|
194 | display: block;
|
195 | margin-top: $form-text-margin-top;
|
196 | }
|
197 |
|
198 |
|
199 |
|
200 |
|
201 |
|
202 |
|
203 | .form-check {
|
204 | position: relative;
|
205 | display: block;
|
206 | margin-bottom: $form-check-margin-bottom;
|
207 |
|
208 | &.disabled {
|
209 | .form-check-label {
|
210 | color: $text-muted;
|
211 | cursor: $cursor-disabled;
|
212 | }
|
213 | }
|
214 | }
|
215 |
|
216 | .form-check-label {
|
217 | padding-left: $form-check-input-gutter;
|
218 | margin-bottom: 0;
|
219 | cursor: pointer;
|
220 | }
|
221 |
|
222 | .form-check-input {
|
223 | position: absolute;
|
224 | margin-top: $form-check-input-margin-y;
|
225 | margin-left: -$form-check-input-gutter;
|
226 |
|
227 | &:only-child {
|
228 | position: static;
|
229 | }
|
230 | }
|
231 |
|
232 |
|
233 | .form-check-inline {
|
234 | display: inline-block;
|
235 |
|
236 | .form-check-label {
|
237 | vertical-align: middle;
|
238 | }
|
239 |
|
240 | + .form-check-inline {
|
241 | margin-left: $form-check-inline-margin-x;
|
242 | }
|
243 | }
|
244 |
|
245 |
|
246 |
|
247 |
|
248 |
|
249 |
|
250 | .form-control-feedback {
|
251 | margin-top: $form-feedback-margin-top;
|
252 | }
|
253 |
|
254 | .form-control-success,
|
255 | .form-control-warning,
|
256 | .form-control-danger {
|
257 | padding-right: ($input-padding-x * 3);
|
258 | background-repeat: no-repeat;
|
259 | background-position: center right ($input-height / 4);
|
260 | background-size: ($input-height / 2) ($input-height / 2);
|
261 | }
|
262 |
|
263 |
|
264 | .has-success {
|
265 | @include form-control-validation($brand-success);
|
266 |
|
267 | .form-control-success {
|
268 | background-image: $form-icon-success;
|
269 | }
|
270 | }
|
271 |
|
272 | .has-warning {
|
273 | @include form-control-validation($brand-warning);
|
274 |
|
275 | .form-control-warning {
|
276 | background-image: $form-icon-warning;
|
277 | }
|
278 | }
|
279 |
|
280 | .has-danger {
|
281 | @include form-control-validation($brand-danger);
|
282 |
|
283 | .form-control-danger {
|
284 | background-image: $form-icon-danger;
|
285 | }
|
286 | }
|
287 |
|
288 |
|
289 |
|
290 |
|
291 |
|
292 |
|
293 |
|
294 |
|
295 |
|
296 |
|
297 |
|
298 | .form-inline {
|
299 | display: flex;
|
300 | flex-flow: row wrap;
|
301 | align-items: center;
|
302 |
|
303 |
|
304 |
|
305 |
|
306 | .form-check {
|
307 | width: 100%;
|
308 | }
|
309 |
|
310 |
|
311 | @include media-breakpoint-up(sm) {
|
312 | label {
|
313 | display: flex;
|
314 | align-items: center;
|
315 | justify-content: center;
|
316 | margin-bottom: 0;
|
317 | }
|
318 |
|
319 |
|
320 | .form-group {
|
321 | display: flex;
|
322 | flex: 0 0 auto;
|
323 | flex-flow: row wrap;
|
324 | align-items: center;
|
325 | margin-bottom: 0;
|
326 | }
|
327 |
|
328 |
|
329 | .form-control {
|
330 | display: inline-block;
|
331 | width: auto;
|
332 | vertical-align: middle;
|
333 | }
|
334 |
|
335 |
|
336 | .form-control-static {
|
337 | display: inline-block;
|
338 | }
|
339 |
|
340 | .input-group {
|
341 | width: auto;
|
342 | }
|
343 |
|
344 | .form-control-label {
|
345 | margin-bottom: 0;
|
346 | vertical-align: middle;
|
347 | }
|
348 |
|
349 |
|
350 |
|
351 | .form-check {
|
352 | display: flex;
|
353 | align-items: center;
|
354 | justify-content: center;
|
355 | width: auto;
|
356 | margin-top: 0;
|
357 | margin-bottom: 0;
|
358 | }
|
359 | .form-check-label {
|
360 | padding-left: 0;
|
361 | }
|
362 | .form-check-input {
|
363 | position: relative;
|
364 | margin-top: 0;
|
365 | margin-right: $form-check-input-margin-x;
|
366 | margin-left: 0;
|
367 | }
|
368 |
|
369 |
|
370 | .custom-control {
|
371 | display: flex;
|
372 | align-items: center;
|
373 | justify-content: center;
|
374 | padding-left: 0;
|
375 | }
|
376 | .custom-control-indicator {
|
377 | position: static;
|
378 | display: inline-block;
|
379 | margin-right: $form-check-input-margin-x;
|
380 | vertical-align: text-bottom;
|
381 | }
|
382 |
|
383 |
|
384 | .has-feedback .form-control-feedback {
|
385 | top: 0;
|
386 | }
|
387 | }
|
388 | }
|