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"] { | |
26 | &::-webkit-input-placeholder { /* WebKit browsers */ | |
852e099f | 27 | color: $wcfInputPlaceholder; |
a5968043 MW |
28 | } |
29 | &::-moz-placeholder { /* Mozilla Firefox 19+ */ | |
852e099f | 30 | color: $wcfInputPlaceholder; |
a5968043 MW |
31 | } |
32 | &:-ms-input-placeholder { /* Internet Explorer 10+ */ | |
852e099f | 33 | color: $wcfInputPlaceholder; |
a5968043 | 34 | } |
5d0e8b3f AE |
35 | |
36 | &:focus, | |
37 | &:hover { | |
38 | &::-webkit-input-placeholder { /* WebKit browsers */ | |
39 | color: $wcfInputPlaceholderActive; | |
40 | } | |
41 | &::-moz-placeholder { /* Mozilla Firefox 19+ */ | |
42 | color: $wcfInputPlaceholderActive; | |
43 | } | |
44 | &:-ms-input-placeholder { /* Internet Explorer 10+ */ | |
45 | color: $wcfInputPlaceholderActive; | |
46 | } | |
47 | } | |
5dd18761 AE |
48 | |
49 | &[disabled], | |
50 | &[readonly] { | |
51 | background-color: $wcfInputDisabledBackground !important; | |
52 | border-color: $wcfInputDisabledBorder !important; | |
53 | color: $wcfInputDisabledText !important; | |
54 | } | |
a5968043 MW |
55 | } |
56 | ||
0d720e55 MW |
57 | input[type="search"], |
58 | input[type="text"] { | |
393c6d8f MS |
59 | -webkit-appearance: none; |
60 | } | |
61 | ||
05723ff3 | 62 | /* prevent iOS from zooming when focusing inputs */ |
231008a5 AE |
63 | .iOS { |
64 | input[type="date"], | |
65 | input[type="datetime"], | |
66 | input[type="email"], | |
67 | input[type="number"], | |
68 | input[type="password"], | |
69 | input[type="search"], | |
cce1f39a | 70 | input[type="tel"], |
231008a5 AE |
71 | input[type="text"], |
72 | input[type="url"], | |
05723ff3 | 73 | select, |
231008a5 AE |
74 | textarea { |
75 | font-size: 16px; | |
76 | } | |
77 | } | |
78 | ||
f2b50825 AE |
79 | textarea { |
80 | border-width: 1px; | |
bec1bb2e | 81 | font-weight: 400; |
392811ed | 82 | vertical-align: top; |
f2b50825 AE |
83 | width: 100%; |
84 | ||
5908f54f | 85 | @include wcfFontDefault; |
a1e91e22 MW |
86 | |
87 | &[disabled], | |
88 | &[readonly] { | |
89 | background-color: $wcfInputDisabledBackground !important; | |
90 | border-color: $wcfInputDisabledBorder !important; | |
91 | color: $wcfInputDisabledText !important; | |
92 | } | |
f2b50825 AE |
93 | } |
94 | ||
a8d21e29 MW |
95 | input[disabled], |
96 | textarea[disabled] { | |
97 | -webkit-text-fill-color: $wcfInputDisabledText; /* override safari font color change */ | |
98 | -webkit-opacity: 1; /* override mobile safari opacity change affecting text color */ | |
99 | } | |
100 | ||
12f80644 AE |
101 | select { |
102 | // The width is determined by the browser based upon the longest <option> contained, | |
103 | // but this can cause the <select> to overflow the parent container. This is acceptable | |
104 | // to some extent, but on mobile it can cause the entire site to have a horizontal | |
105 | // scrollbar instead. Setting a `max-width` will cause the browser to respect the page | |
106 | // boundaries and nicely wrap the displayed value instead. | |
107 | max-width: 100%; | |
cf4e950c MS |
108 | |
109 | &.fullWidth { | |
110 | width: 100%; | |
111 | } | |
12f80644 AE |
112 | } |
113 | ||
f2b50825 AE |
114 | .formSubmit { |
115 | text-align: center; | |
116 | ||
117 | &:not(:first-child) { | |
487db634 | 118 | margin-top: 30px; |
f2b50825 AE |
119 | } |
120 | ||
f216765b | 121 | @include screen-xs { |
0923f8db AE |
122 | > .button, |
123 | > button, | |
124 | > input { | |
125 | display: block; | |
126 | padding: 7px 10px; | |
127 | width: 100%; | |
128 | ||
129 | &:not(:first-child) { | |
130 | margin-top: 10px; | |
131 | } | |
132 | } | |
f2b50825 | 133 | } |
f216765b AE |
134 | |
135 | @include screen-sm-up { | |
f12fdc8b AE |
136 | /* the `margin-bottom` styles are required to deal with buttons wrapping |
137 | into the next row, also requires some changes to `.dialogFormSubmit`! */ | |
138 | margin-bottom: -10px; | |
139 | ||
140 | > button, | |
141 | > input[type="button"], | |
142 | > input[type="reset"], | |
143 | > input[type="submit"], | |
144 | > .button, | |
145 | > a.button { | |
146 | margin-bottom: 10px; | |
147 | } | |
148 | ||
f216765b AE |
149 | > :not(:first-child) { |
150 | margin-left: 10px; | |
151 | } | |
152 | } | |
f2b50825 AE |
153 | } |
154 | ||
f027ba61 | 155 | .inputAddon { |
f2b50825 AE |
156 | display: flex; |
157 | ||
158 | &:not(:last-child) { | |
159 | margin-bottom: 5px; | |
160 | } | |
161 | ||
dfef03a8 | 162 | > .inputPrefix, |
f2b50825 | 163 | > .inputSuffix { |
0de1d7fb AE |
164 | align-items: center; |
165 | display: flex; | |
f2b50825 AE |
166 | flex: 0 0 auto; |
167 | ||
168 | &.button { | |
169 | border-radius: 0; | |
f2b50825 | 170 | } |
f027ba61 AE |
171 | |
172 | &:not(.button) { | |
173 | background-color: $wcfButtonBackground; | |
640a8bea | 174 | border: 1px solid $wcfInputBorder; |
f027ba61 AE |
175 | color: $wcfButtonText; |
176 | cursor: default; | |
f027ba61 AE |
177 | padding: 3px 5px; |
178 | } | |
f2b50825 AE |
179 | } |
180 | ||
dfef03a8 | 181 | > .inputPrefix { |
640a8bea | 182 | border-right-width: 0 !important; |
dfef03a8 AE |
183 | } |
184 | ||
185 | > .inputSuffix { | |
9faa5247 AE |
186 | &.button { |
187 | margin-left: 5px; | |
188 | } | |
189 | ||
190 | &:not(.button) { | |
191 | border-left-width: 0 !important; | |
192 | } | |
dfef03a8 AE |
193 | } |
194 | ||
f027ba61 | 195 | input { |
f2b50825 | 196 | flex: 1 auto; |
dfef03a8 AE |
197 | |
198 | & + .inputPrefix { | |
199 | margin-left: 5px; | |
200 | } | |
f2b50825 AE |
201 | } |
202 | } | |
203 | ||
f027ba61 AE |
204 | .inputAddonTextarea { |
205 | flex-wrap: wrap; | |
206 | ||
207 | > .inputPrefix.button { | |
208 | border-bottom-width: 0; | |
209 | border-radius: 0; | |
210 | } | |
211 | ||
212 | > textarea { | |
213 | flex: 0 0 100%; | |
214 | } | |
e1b30522 AE |
215 | |
216 | > .redactor-box { | |
217 | flex: 0 0 100%; | |
218 | margin-top: 0 !important; | |
219 | } | |
f027ba61 AE |
220 | } |
221 | ||
222 | .inputAddon input, | |
223 | input { | |
f027ba61 AE |
224 | &.tiny { |
225 | flex-grow: 0; | |
226 | width: 80px; | |
227 | } | |
228 | ||
87275aa7 | 229 | &.long { |
87275aa7 | 230 | width: 100%; |
f027ba61 AE |
231 | } |
232 | ||
87275aa7 MW |
233 | @include screen-xs { |
234 | &.short { | |
235 | flex-grow: 0; | |
236 | width: 150px; | |
237 | } | |
238 | ||
239 | &.medium { | |
87275aa7 MW |
240 | width: 100%; |
241 | } | |
f027ba61 AE |
242 | } |
243 | ||
87275aa7 MW |
244 | @include screen-sm-up { |
245 | &.short { | |
246 | flex-grow: 0; | |
247 | min-width: 80px; | |
248 | width: 10%; | |
249 | } | |
250 | ||
251 | &.medium { | |
252 | flex-grow: 0; | |
253 | min-width: 150px; | |
254 | width: 30%; | |
255 | } | |
f027ba61 | 256 | } |
f2b50825 | 257 | } |
a44dd9c3 | 258 | |
771df927 AE |
259 | .formError { |
260 | dt { | |
261 | color: rgba(204, 0, 1, 1) !important; | |
262 | } | |
263 | ||
264 | input, | |
265 | select, | |
266 | textarea { | |
267 | border-color: rgba(204, 0, 1, 1) !important; | |
268 | } | |
269 | } | |
270 | ||
a44dd9c3 AE |
271 | /* grid-based form controls */ |
272 | .formGrid { | |
273 | dt { | |
274 | display: none; | |
275 | } | |
276 | ||
a44dd9c3 AE |
277 | select { |
278 | width: 100%; | |
279 | } | |
280 | } | |
71e527fb AE |
281 | |
282 | .customOptionRequired { | |
283 | color: rgba(204, 0, 1, 1) !important; | |
284 | } |