This repository has been archived by the owner on Apr 23, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
forms.css
350 lines (328 loc) · 10.2 KB
/
forms.css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
/*
Document : forms.css
Version : 1.0
Created on : Dec 21, 2011
Author : Levi Morrison <[email protected]>
License : none (public domain)
Description:
This stylesheet hopes to provide attractive and consistent styles for
form elements in modern browsers.
*/
.ui-form {
display:block;
max-width: 400px;
background:#f5f5f5;
border:1px solid #e5e5e5
}
.ui-form label[for],
.ui-form legend {
padding:.33em 0;
font-weight: bold;
}
.ui-form fieldset legend {
padding-top:.66em;
font-size:1.2em;
}
.ui-form label {
padding:.33em 0;
}
.ui-form > fieldset {
padding:1em;
}
.ui-form label,
.ui-form input[type='email'],
.ui-form input[type='tel'],
.ui-form input[type='number'],
.ui-form input[type='password'],
.ui-form input[type='text'],
.ui-form input[type='url'],
.ui-form select,
.ui-form textarea,
.ui-form legend,
.ui-form button {
display:block;
width:100%;
margin:0 auto;
}
.ui-form input,
.ui-form select,
.ui-form textarea,
.ui-form button {
font-size:1em;
padding:.33em .5em;
-webkit-box-sizing:border-box;
-moz-box-sizing:border-box;
box-sizing:border-box;
}
.ui-form input[type='email'],
.ui-form input[type='tel'],
.ui-form input[type='number'],
.ui-form input[type='password'],
.ui-form input[type='text'],
.ui-form input[type='url'],
.ui-form textarea {
background: #fff;
border: 1px solid #d9d9d9;
border-top: 1px solid #c0c0c0;
}
.ui-form input[type='email']:hover,
.ui-form input[type='tel']:hover,
.ui-form input[type='number']:hover,
.ui-form input[type='password']:hover,
.ui-form input[type='text']:hover,
.ui-form input[type='url']:hover,
.ui-form textarea:hover {
border: 1px solid #b9b9b9;
border-top: 1px solid #a0a0a0;
-webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
-moz-box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}
.ui-form input[type='email']:focus,
.ui-form input[type='tel']:focus,
.ui-form input[type='number']:focus,
.ui-form input[type='password']:focus,
.ui-form input[type='text']:focus,
.ui-form input[type='url']:focus,
.ui-form textarea:focus {
outline: none;
border: 1px solid #0095cd;
-webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,0.3);
-moz-box-shadow: inset 0 1px 2px rgba(0,0,0,0.3);
box-shadow: inset 0 1px 2px rgba(0,0,0,0.3);
}
.ui-form input[disabled][type='email'],
.ui-form input[disabled][type='tel'],
.ui-form input[disabled][type='number'],
.ui-form input[disabled][type='password'],
.ui-form input[disabled][type='text'],
.ui-form input[disabled][type='url'],
.ui-form textarea[disabled] {
background: #eee;
border: 1px solid #ccc;
border-top: 1px solid #b9b9b9;
}
.ui-form select:hover,
.ui-form select:focus,
.ui-form select:active {
outline-color:#4d90fe;
-moz-box-shadow:0 0 2px #4d90fe;
}
.ui-form button {
min-width: 46px;
text-align: center;
font-weight: bold;
font-size:1em;
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
-webkit-transition: all 0.218s;
-moz-transition: all 0.218s;
-ms-transition: all 0.218s;
-o-transition: all 0.218s;
transition: all 0.218s;
border: 1px solid rgba(0,0,0,0.1);
background-color: #f5f5f5;
background-image: -webkit-linear-gradient(top,#f5f5f5,#f1f1f1);
background-image: -moz-linear-gradient(top,#f5f5f5,#f1f1f1);
background-image: -ms-linear-gradient(top,#f5f5f5,#f1f1f1);
background-image: -o-linear-gradient(top,#f5f5f5,#f1f1f1);
background-image: linear-gradient(top,#f5f5f5,#f1f1f1);
cursor: pointer;
}
.ui-form button::-moz-focus-inner {
border: 0;
padding: 0;
}
.ui-form button:hover {
border: 1px solid #c6c6c6;
color: #333;
-webkit-transition: all 0.0s;
-moz-transition: all 0.0s;
-ms-transition: all 0.0s;
-o-transition: all 0.0s;
transition: all 0.0s;
background-color: #f8f8f8;
background-image: -webkit-linear-gradient(top,#f8f8f8,#f1f1f1);
background-image: -moz-linear-gradient(top,#f8f8f8,#f1f1f1);
background-image: -ms-linear-gradient(top,#f8f8f8,#f1f1f1);
background-image: -o-linear-gradient(top,#f8f8f8,#f1f1f1);
background-image: linear-gradient(top,#f8f8f8,#f1f1f1);
-webkit-box-shadow: 0 1px 1px rgba(0,0,0,0.1);
-moz-box-shadow: 0 1px 1px rgba(0,0,0,0.1);
box-shadow: 0 1px 1px rgba(0,0,0,0.1);
}
.ui-form button:focus {
outline:0;
-webkit-box-shadow: inset 0 0 0 1px #fff, 0 0 2px rgba(0,0,0,.75);
-moz-box-shadow: inset 0 0 0 1px #fff, 0 0 2px rgba(0,0,0,.75);
box-shadow: inset 0 0 0 1px #fff, 0 0 2px rgba(0,0,0,.75);
}
.ui-form button:active {
background-color: #f6f6f6;
background-image: -webkit-linear-gradient(top,#f6f6f6,#f1f1f1);
background-image: -moz-linear-gradient(top,#f6f6f6,#f1f1f1);
background-image: -ms-linear-gradient(top,#f6f6f6,#f1f1f1);
background-image: -o-linear-gradient(top,#f6f6f6,#f1f1f1);
background-image: linear-gradient(top,#f6f6f6,#f1f1f1);
-webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
-moz-box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
-webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,0.3);
-moz-box-shadow: inset 0 1px 2px rgba(0,0,0,0.3);
box-shadow: inset 0 1px 2px rgba(0,0,0,0.3);
}
.ui-form .blue,
.ui-form .red {
color: #fff;
text-shadow: 0 1px rgba(0,0,0,0.1);
}
.ui-form .blue:hover,
.ui-form .red:hover {
color: #fff;
text-shadow: 0 1px rgba(0,0,0,0.3);
background-color: #357ae8;
}
.ui-form .blue:active,
.ui-form .red:active {
-webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,0.3);
-moz-box-shadow: inset 0 1px 2px rgba(0,0,0,0.3);
box-shadow: inset 0 1px 2px rgba(0,0,0,0.3);
}
.ui-form .blue {
border-color: #0079A6;
background-color: #0095cd;
background-image: -webkit-linear-gradient(top, #0095cd 0%,#008bbf 100%);
background-image: -moz-linear-gradient(top, #0095cd 0%, #008bbf 100%);
background-image: -ms-linear-gradient(top, #0095cd 0%,#008bbf 100%);
background-image: -o-linear-gradient(top, #0095cd 0%,#008bbf 100%);
background-image: linear-gradient(top, #0095cd 0%,#008bbf 100%);
}
.ui-form .blue:hover,
.ui-form .blue:active {
border-color: #007099;
background-color: #0095cd;
background-image: -webkit-linear-gradient(top, #0095cd 0%,#0080b0 100%);
background-image: -moz-linear-gradient(top, #0095cd 0%, #0080b0 100%);
background-image: -ms-linear-gradient(top, #0095cd 0%,#0080b0 100%);
background-image: -o-linear-gradient(top, #0095cd 0%,#0080b0 100%);
background-image: linear-gradient(top, #0095cd 0%,#0080b0 100%);
}
.ui-form .red {
border-color:#B02600;
background-color: #e33100;
background-image: -webkit-linear-gradient(top, #e33100 0%,#d42e00 100%);
background-image: -moz-linear-gradient(top, #e33100 0%, #d42e00 100%);
background-image: -ms-linear-gradient(top, #e33100 0%,#d42e00 100%);
background-image: -o-linear-gradient(top, #e33100 0%,#d42e00 100%);
background-image: linear-gradient(top, #e33100 0%,#d42e00 100%);
}
.ui-form .red:hover,
.ui-form .red:active {
border-color:#BA2800;
background-color: #e33100;
background-image: -webkit-linear-gradient(top, #e33100 0%,#BA2800 100%);
background-image: -moz-linear-gradient(top, #e33100 0%, #BA2800 100%);
background-image: -ms-linear-gradient(top, #e33100 0%,#BA2800 100%);
background-image: -o-linear-gradient(top, #e33100 0%,#BA2800 100%);
background-image: linear-gradient(top, #e33100 0%,#BA2800 100%);
}
.ui-form input[type="checkbox"]:hover {
border-color: #c6c6c6;
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,0.1);
-moz-box-shadow: inset 0 1px 1px rgba(0,0,0,0.1);
box-shadow: inset 0 1px 1px rgba(0,0,0,0.1);
}
.ui-form input[type="checkbox"],
.ui-form input[type="radio"] {
-webkit-appearance: none;
appearance: none;
width:1em;
height:1em;
margin: 0;
padding:0;
cursor: pointer;
vertical-align: bottom;
background: white;
border: 1px solid gainsboro;
-webkit-border-radius: 1px;
-moz-border-radius: 1px;
border-radius: 1px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
position: relative;
border-image: initial;
}
.ui-form input[type=checkbox]:active,
.ui-form input[type=radio]:active {
border-color: #c6c6c6;
background: #ebebeb;
}
.ui-form input[type=checkbox]:checked,
.ui-form input[type=radio]:checked {
background: #fff;
}
.ui-form input[type=radio]:checked::after {
content: '';
display: block;
position: relative;
top: 2px;
left: 2px;
width: 7px;
height: 7px;
background: rgba(0,0,0,.66);
-webkit-border-radius: 1em;
-moz-border-radius: 1em;
border-radius: 1em;
}
.ui-form input[type=checkbox]:checked::after {
content: url('https://ssl.gstatic.com/ui/v1/menu/checkmark.png');
display: block;
position: absolute;
top: -6px;
left: -5px;
}
.ui-form input[type=checkbox]:focus {
outline: none;
border-color:#4d90fe;
}
.ui-form input[type=radio] {
-webkit-border-radius: 1em;
-moz-border-radius: 1em;
border-radius: 1em;
}
.required::after {
content:' (required)';
color:#4d90fe;
font-style:italic;
font-size:75%;
}
.ui-form label.error,
.error.required::after {
color:#e33100;
}
.ui-form input[type='email'].error,
.ui-form input[type='tel'].error,
.ui-form input[type='number'].error,
.ui-form input[type='password'].error,
.ui-form input[type='text'].error,
.ui-form input[type='url'].error,
.ui-form textarea.error,
.ui-form input[type='email']:invalid,
.ui-form input[type='tel']:invalid,
.ui-form input[type='number']:invalid,
.ui-form input[type='password']:invalid,
.ui-form input[type='text']:invalid,
.ui-form input[type='url']:invalid,
.ui-form textarea:invalid,
.ui-form input[type='email'][aria-invalid='true'],
.ui-form input[type='tel'][aria-invalid='true'],
.ui-form input[type='number'][aria-invalid='true'],
.ui-form input[type='password'][aria-invalid='true'],
.ui-form input[type='text'][aria-invalid='true'],
.ui-form input[type='url'][aria-invalid='true'],
.ui-form textarea[aria-invalid='true'] {
border-color:#e33100;
border-top-color:#C92B00;
}