-
Notifications
You must be signed in to change notification settings - Fork 0
/
form-validator.css
120 lines (108 loc) · 3.03 KB
/
form-validator.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
/*
Name: JavaScript Form Validator CSS
Description: JavaScript Form Validator default CSS stylesheet
Repository: https://github.com/AlejandroPerezMartin/javascript-form-validator
Version: 1.0.0
Author: Alejandro Perez Martin
Author URL: http://www.linkedin.com/in/aleperez92
*/
.js-form p {
display: block;
position: relative;
}
.js-form label {
display: inline-block;
margin-bottom: .25em;
font-weight: bold;
}
.js-form input,
.js-form textarea {
background: #fff;
border: 1px solid #ccc;
border-radius: .5em;
-webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,.1);
-moz-box-shadow: inset 0 1px 2px rgba(0,0,0,.1);
box-shadow: inset 0 1px 2px rgba(0,0,0,.1);
display: block;
margin: 0;
padding: .5em 1em;
-webkit-transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
-moz-transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
-o-transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}
.js-form input:focus,
.js-form textarea:focus {
border-color: #60bcd9;
-webkit-box-shadow: 0 1px 1px rgba(0,0,0,.1), 0 0 6px #acd7d1;
-moz-box-shadow: 0 1px 1px rgba(0,0,0,.1), 0 0 6px #acd7d1;
box-shadow: 0 1px 1px rgba(0,0,0,.1), 0 0 6px #acd7d1;
outline: none;
}
.js-form input[type='radio'],
.js-form input[type='number'],
.js-form input[type='checkbox'] {
display: inline-block;
}
.js-form input[type='submit'] {
background: #60bdc9;
border: none;
color: #FFF;
cursor: pointer;
font-weight: bold;
font-size: 1em;
padding: 1em 2em;
text-shadow: 0 1px 0 #25abba;
-webkit-transition: all .3s ease-in-out;
-moz-transition: all .3s ease-in-out;
-o-transition: all .3s ease-in-out;
transition: all .3s ease-in-out;
}
.js-form input[type='submit']:hover,
.js-form input[type='submit']:focus {
background: #25abba;
color: #FFF;
text-shadow: 0 1px 0 #489ca5;
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.1), 0 0 6px #acd7d1;
-moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.1), 0 0 6px #acd7d1;
box-shadow: inset 0 1px 1px rgba(0,0,0,.1), 0 0 6px #acd7d1;
}
.js-form-field-valid {
background: #f1fcd9 !important;
border-color: #cedbad !important;
color: #519548;
}
.js-form-field-invalid {
background: #ffe6e5 !important;
border-color: #edc6c4 !important;
color: #f67f77;
}
.js-form-error-message {
background: #f2fdff;
border-left: 5px solid #60bdc9;
color: #888;
display: inline-block;
margin-bottom: 1.5em;
padding: 1.5em 1em;
}
.js-form-error-message-title {
color: #60bdc9;
display: block;
font-size: 1.25em;
margin-bottom: .5em;
}
.js-form-field-error {
border-radius: .25em;
color: #f67f77;
display: block;
font-size: .75em;
margin-top: .5em;
}
.js-form-field-error::before {
background: #f67f77;
color: #fff;
content: '!';
font-weight: bold;
margin-right: 5px;
padding: 0 5px;
}