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