-
Notifications
You must be signed in to change notification settings - Fork 0
/
style.css
109 lines (83 loc) · 1.49 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
104
105
106
107
108
109
:root {
/* --primary-color: #fd951f; */
--primary-color: #1c93a8;
--bg-color: #130f0d;
--text-color: #f0f0f5;
--light-color: rgba(255, 255, 255, 0.04);
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html {
font-family: "Roboto", sans-serif;
height: 100%;
}
body {
height: 100vh;
display: flex;
flex-direction: column;
background-color: var(--bg-color);
color: var(--text-color);
}
form {
background: rgba(255, 255, 255, 0.03);
width: 100%;
max-width: 500px;
margin: 32px auto;
padding: 32px 64px;
display: flex;
flex-direction: column;
}
form h2 {
margin-bottom: 32px;
}
div.input {
margin-bottom: 24px;
position: relative;
}
input,
button {
/* reset appearence */
-moz-appearance: none;
-webkit-appearance: none;
appearance: none;
/* box */
width: 100%;
padding: 16px 0;
border: none;
border-bottom: 1px solid var(--primary-color);
background-color: transparent;
outline: none;
/* text */
color: var(--text-color);
font-size: 1em;
}
button {
margin-top: 16px;
background-color: var(--primary-color);
cursor: pointer;
}
input~label {
position: absolute;
top: 16px;
left: 0;
color: rgba(255, 255, 255, 0.6);
transition: .4s;
}
input:focus~label,
input:valid~label {
transform: translateY(-24px);
font-size: 0.8em;
letter-spacing: 0.1em;
}
span.error {
display: flex;
padding: 0;
background-color: rgba(0, 0, 0, 0.2);
}
span.error.active {
border: 1px solid red;
padding: 0.4em;
}