Commit | Line | Data |
---|---|---|
f2b50825 AE |
1 | input[type="date"], |
2 | input[type="datetime"], | |
3 | input[type="email"], | |
4 | input[type="number"], | |
5 | input[type="password"], | |
6 | input[type="search"], | |
cce1f39a | 7 | input[type="tel"], |
f2b50825 AE |
8 | input[type="text"], |
9 | input[type="url"], | |
10 | select, | |
11 | textarea { | |
f80126a6 | 12 | margin: 0; /* safari fix */ |
d40daae6 | 13 | @include input; |
f2b50825 AE |
14 | } |
15 | ||
a5968043 MW |
16 | /* set placeholder color */ |
17 | input[type="date"], | |
18 | input[type="datetime"], | |
19 | input[type="email"], | |
20 | input[type="number"], | |
21 | input[type="password"], | |
22 | input[type="search"], | |
cce1f39a | 23 | input[type="tel"], |
a5968043 MW |
24 | input[type="text"], |
25 | input[type="url"] { | |
8a52619a TD |
26 | &::-webkit-input-placeholder { |
27 | /* WebKit browsers */ | |
852e099f | 28 | color: $wcfInputPlaceholder; |
a5968043 | 29 | } |
8a52619a TD |
30 | &::-moz-placeholder { |
31 | /* Mozilla Firefox 19+ */ | |
852e099f | 32 | color: $wcfInputPlaceholder; |
a5968043 | 33 | } |
8a52619a TD |
34 | &:-ms-input-placeholder { |
35 | /* Internet Explorer 10+ */ | |
852e099f | 36 | color: $wcfInputPlaceholder; |
a5968043 | 37 | } |
8a52619a | 38 | |
5d0e8b3f AE |
39 | &:focus, |
40 | &:hover { | |
8a52619a TD |
41 | &::-webkit-input-placeholder { |
42 | /* WebKit browsers */ | |
5d0e8b3f AE |
43 | color: $wcfInputPlaceholderActive; |
44 | } | |
8a52619a TD |
45 | &::-moz-placeholder { |
46 | /* Mozilla Firefox 19+ */ | |
5d0e8b3f AE |
47 | color: $wcfInputPlaceholderActive; |
48 | } | |
8a52619a TD |
49 | &:-ms-input-placeholder { |
50 | /* Internet Explorer 10+ */ | |
5d0e8b3f AE |
51 | color: $wcfInputPlaceholderActive; |
52 | } | |
53 | } | |
8a52619a | 54 | |
5dd18761 AE |
55 | &[disabled], |
56 | &[readonly] { | |
57 | background-color: $wcfInputDisabledBackground !important; | |
58 | border-color: $wcfInputDisabledBorder !important; | |
59 | color: $wcfInputDisabledText !important; | |
60 | } | |
a5968043 MW |
61 | } |
62 | ||
0d720e55 MW |
63 | input[type="search"], |
64 | input[type="text"] { | |
393c6d8f MS |
65 | -webkit-appearance: none; |
66 | } | |
67 | ||
05723ff3 | 68 | /* prevent iOS from zooming when focusing inputs */ |
231008a5 AE |
69 | .iOS { |
70 | input[type="date"], | |
71 | input[type="datetime"], | |
72 | input[type="email"], | |
73 | input[type="number"], | |
74 | input[type="password"], | |
75 | input[type="search"], | |
cce1f39a | 76 | input[type="tel"], |
231008a5 AE |
77 | input[type="text"], |
78 | input[type="url"], | |
05723ff3 | 79 | select, |
231008a5 AE |
80 | textarea { |
81 | font-size: 16px; | |
82 | } | |
83 | } | |
84 | ||
f2b50825 AE |
85 | textarea { |
86 | border-width: 1px; | |
bec1bb2e | 87 | font-weight: 400; |
392811ed | 88 | vertical-align: top; |
f2b50825 | 89 | width: 100%; |
8a52619a | 90 | |
5908f54f | 91 | @include wcfFontDefault; |
8a52619a | 92 | |
a1e91e22 MW |
93 | &[disabled], |
94 | &[readonly] { | |
95 | background-color: $wcfInputDisabledBackground !important; | |
96 | border-color: $wcfInputDisabledBorder !important; | |
97 | color: $wcfInputDisabledText !important; | |
98 | } | |
f2b50825 AE |
99 | } |
100 | ||
a8d21e29 MW |
101 | input[disabled], |
102 | textarea[disabled] { | |
103 | -webkit-text-fill-color: $wcfInputDisabledText; /* override safari font color change */ | |
104 | -webkit-opacity: 1; /* override mobile safari opacity change affecting text color */ | |
105 | } | |
106 | ||
12f80644 AE |
107 | select { |
108 | // The width is determined by the browser based upon the longest <option> contained, | |
109 | // but this can cause the <select> to overflow the parent container. This is acceptable | |
110 | // to some extent, but on mobile it can cause the entire site to have a horizontal | |
111 | // scrollbar instead. Setting a `max-width` will cause the browser to respect the page | |
112 | // boundaries and nicely wrap the displayed value instead. | |
113 | max-width: 100%; | |
8a52619a | 114 | |
cf4e950c MS |
115 | &.fullWidth { |
116 | width: 100%; | |
117 | } | |
12f80644 AE |
118 | } |
119 | ||
f2b50825 AE |
120 | .formSubmit { |
121 | text-align: center; | |
8a52619a | 122 | |
f2b50825 | 123 | &:not(:first-child) { |
487db634 | 124 | margin-top: 30px; |
f2b50825 | 125 | } |
8a52619a | 126 | |
f216765b | 127 | @include screen-xs { |
0923f8db AE |
128 | > .button, |
129 | > button, | |
130 | > input { | |
131 | display: block; | |
132 | padding: 7px 10px; | |
133 | width: 100%; | |
8a52619a | 134 | |
0923f8db AE |
135 | &:not(:first-child) { |
136 | margin-top: 10px; | |
137 | } | |
138 | } | |
f2b50825 | 139 | } |
8a52619a | 140 | |
f216765b | 141 | @include screen-sm-up { |
f12fdc8b AE |
142 | /* the `margin-bottom` styles are required to deal with buttons wrapping |
143 | into the next row, also requires some changes to `.dialogFormSubmit`! */ | |
144 | margin-bottom: -10px; | |
8a52619a | 145 | |
f12fdc8b AE |
146 | > button, |
147 | > input[type="button"], | |
148 | > input[type="reset"], | |
149 | > input[type="submit"], | |
150 | > .button, | |
151 | > a.button { | |
152 | margin-bottom: 10px; | |
153 | } | |
8a52619a | 154 | |
f216765b AE |
155 | > :not(:first-child) { |
156 | margin-left: 10px; | |
157 | } | |
158 | } | |
f2b50825 AE |
159 | } |
160 | ||
f027ba61 | 161 | .inputAddon { |
f2b50825 | 162 | display: flex; |
8a52619a | 163 | |
f2b50825 AE |
164 | &:not(:last-child) { |
165 | margin-bottom: 5px; | |
166 | } | |
8a52619a | 167 | |
dfef03a8 | 168 | > .inputPrefix, |
f2b50825 | 169 | > .inputSuffix { |
0de1d7fb AE |
170 | align-items: center; |
171 | display: flex; | |
f2b50825 | 172 | flex: 0 0 auto; |
8a52619a | 173 | |
f2b50825 AE |
174 | &.button { |
175 | border-radius: 0; | |
f2b50825 | 176 | } |
8a52619a | 177 | |
f027ba61 AE |
178 | &:not(.button) { |
179 | background-color: $wcfButtonBackground; | |
640a8bea | 180 | border: 1px solid $wcfInputBorder; |
f027ba61 AE |
181 | color: $wcfButtonText; |
182 | cursor: default; | |
f027ba61 AE |
183 | padding: 3px 5px; |
184 | } | |
f2b50825 | 185 | } |
8a52619a | 186 | |
dfef03a8 | 187 | > .inputPrefix { |
640a8bea | 188 | border-right-width: 0 !important; |
dfef03a8 | 189 | } |
8a52619a | 190 | |
dfef03a8 | 191 | > .inputSuffix { |
9faa5247 AE |
192 | &.button { |
193 | margin-left: 5px; | |
194 | } | |
8a52619a | 195 | |
9faa5247 AE |
196 | &:not(.button) { |
197 | border-left-width: 0 !important; | |
198 | } | |
dfef03a8 | 199 | } |
8a52619a | 200 | |
f027ba61 | 201 | input { |
f2b50825 | 202 | flex: 1 auto; |
8a52619a | 203 | |
dfef03a8 AE |
204 | & + .inputPrefix { |
205 | margin-left: 5px; | |
206 | } | |
f2b50825 AE |
207 | } |
208 | } | |
209 | ||
f027ba61 AE |
210 | .inputAddonTextarea { |
211 | flex-wrap: wrap; | |
8a52619a | 212 | |
f027ba61 AE |
213 | > .inputPrefix.button { |
214 | border-bottom-width: 0; | |
215 | border-radius: 0; | |
216 | } | |
8a52619a | 217 | |
f027ba61 AE |
218 | > textarea { |
219 | flex: 0 0 100%; | |
220 | } | |
8a52619a | 221 | |
e1b30522 AE |
222 | > .redactor-box { |
223 | flex: 0 0 100%; | |
224 | margin-top: 0 !important; | |
225 | } | |
f027ba61 AE |
226 | } |
227 | ||
228 | .inputAddon input, | |
229 | input { | |
f027ba61 AE |
230 | &.tiny { |
231 | flex-grow: 0; | |
232 | width: 80px; | |
233 | } | |
8a52619a | 234 | |
87275aa7 | 235 | &.long { |
87275aa7 | 236 | width: 100%; |
f027ba61 | 237 | } |
8a52619a | 238 | |
87275aa7 MW |
239 | @include screen-xs { |
240 | &.short { | |
241 | flex-grow: 0; | |
242 | width: 150px; | |
243 | } | |
8a52619a | 244 | |
87275aa7 | 245 | &.medium { |
87275aa7 MW |
246 | width: 100%; |
247 | } | |
f027ba61 | 248 | } |
8a52619a | 249 | |
87275aa7 MW |
250 | @include screen-sm-up { |
251 | &.short { | |
252 | flex-grow: 0; | |
253 | min-width: 80px; | |
254 | width: 10%; | |
255 | } | |
8a52619a | 256 | |
87275aa7 MW |
257 | &.medium { |
258 | flex-grow: 0; | |
259 | min-width: 150px; | |
260 | width: 30%; | |
261 | } | |
f027ba61 | 262 | } |
f2b50825 | 263 | } |
a44dd9c3 | 264 | |
771df927 AE |
265 | .formError { |
266 | dt { | |
267 | color: rgba(204, 0, 1, 1) !important; | |
268 | } | |
8a52619a | 269 | |
771df927 AE |
270 | input, |
271 | select, | |
272 | textarea { | |
273 | border-color: rgba(204, 0, 1, 1) !important; | |
274 | } | |
275 | } | |
276 | ||
a44dd9c3 AE |
277 | /* grid-based form controls */ |
278 | .formGrid { | |
279 | dt { | |
280 | display: none; | |
281 | } | |
8a52619a | 282 | |
a44dd9c3 AE |
283 | select { |
284 | width: 100%; | |
285 | } | |
286 | } | |
71e527fb | 287 | |
310fbddf | 288 | .formFieldRequired, |
71e527fb AE |
289 | .customOptionRequired { |
290 | color: rgba(204, 0, 1, 1) !important; | |
291 | } | |
a23fd3ee AE |
292 | |
293 | /* password strength estimator */ | |
294 | .inputAddonPasswordStrength { | |
295 | align-items: flex-start; | |
8a52619a | 296 | |
a23fd3ee AE |
297 | @include screen-xs { |
298 | flex-direction: column; | |
299 | } | |
300 | } | |
301 | ||
302 | .passwordStrengthRating { | |
303 | flex: 0 0 auto; | |
8a52619a | 304 | |
a23fd3ee AE |
305 | @include screen-sm-up { |
306 | margin-left: 10px; | |
307 | } | |
8a52619a | 308 | |
a23fd3ee AE |
309 | @include screen-xs { |
310 | margin-top: 5px; | |
311 | width: 100%; | |
312 | } | |
313 | } | |
314 | ||
315 | .passwordStrengthScore { | |
316 | background-color: rgb(224, 224, 224); | |
317 | border-radius: 3px; | |
318 | display: block; | |
319 | height: 10px; | |
320 | overflow: hidden; | |
321 | position: relative; | |
8a52619a | 322 | |
a23fd3ee AE |
323 | &::before { |
324 | background-color: transparent; | |
325 | bottom: 0; | |
326 | content: ""; | |
327 | left: 0; | |
328 | position: absolute; | |
329 | top: 0; | |
8a52619a | 330 | transition: background-color 0.12s linear, width 0.12s linear; |
a23fd3ee AE |
331 | width: 0; |
332 | } | |
8a52619a | 333 | |
a23fd3ee | 334 | &[data-score="0"]::before { |
8a52619a | 335 | background-color: #dd2c00; |
829f19ff | 336 | width: 5%; |
a23fd3ee AE |
337 | } |
338 | &[data-score="1"]::before { | |
8a52619a | 339 | background-color: #ff9100; |
829f19ff | 340 | width: 20%; |
a23fd3ee AE |
341 | } |
342 | &[data-score="2"]::before { | |
8a52619a | 343 | background-color: #cddc39; |
829f19ff | 344 | width: 50%; |
a23fd3ee AE |
345 | } |
346 | &[data-score="3"]::before { | |
8a52619a | 347 | background-color: #64dd17; |
829f19ff | 348 | width: 85%; |
a23fd3ee AE |
349 | } |
350 | &[data-score="4"]::before { | |
8a52619a | 351 | background-color: #2e7d32; |
a23fd3ee AE |
352 | width: 100%; |
353 | } | |
354 | } |