-
Notifications
You must be signed in to change notification settings - Fork 0
/
style.css
103 lines (84 loc) · 1.97 KB
/
style.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
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300&display=swap');
:root{
/*Defining variable,root accessible*/
--success-color:#2ecc71;
--error-color: #e74c3c;
}
*{
box-sizing: border-box;
/* The box-sizing property allows us to include the padding and border in an element's total width and height. If you set box-sizing: border-box; on an element, padding and border are included in the width and height: Both divs are the same size now!*/
/*Link - https://jsbin.com/pugenef/1/edit?html,css,output */
}
body{
background-color: #f9fafb;
font-family: 'Opens Sans',sans-serif;
display: flex;
align-items: center;
justify-content: center;
min-height: 50vh;
margin: 0;
}
.container{
background-color: #fff;
border-radius: 5px;
box-shadow: 0 2px 10px rgba(0,0,0,0.3);
width:400px;
}
h2{
text-align: center;
margin:0 0 20px;
}
.form{
padding: 30px 40px;
}
.form-control{
margin-bottom: 10px;
padding-bottom: 20px;
position: relative;
}
.form-control label{
color:#777;
display: block;
margin-bottom:5px;
}
.form-control input{
border:2px solid #f0f0f0;
border-radius: 4px;
display: block;
width:100%;
padding: 10px;
font-size:14px;
}
.form-control input:focus{
outline: 0;
border-color: #777;
}
.form-control.success input{
border-color: var(--success-color);
}
.form-control.error input{
border-color: var(--error-color);
}
.form-control small{
color: var(--error-color);
position: absolute;
bottom: 0;
left: 0;
visibility: hidden;
/*visibility: hidden; = simply hides it whereas Display:none = collapse the content*/
}
.form-control.error small{
visibility: visible;
}
.form button{
cursor: pointer;
background-color: #3498db;
border:2px solid #3498db;
border-radius:4px;
color:#fff;
display: block;
font-size: 16px;
padding: 10px;
margin-top: 20px;
width: 100%;
}