-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathstyle.css
More file actions
60 lines (55 loc) · 1.04 KB
/
style.css
File metadata and controls
60 lines (55 loc) · 1.04 KB
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
:root {
--white: #ffffff;
--black: #222222;
--lightGrey: #979797;
--lightGreen: #3ec878;
}
body {
font-family: 'Styrene A Web', 'Helvetica Neue', sans-serif;
margin: 0;
}
.switch {
position: relative;
display: inline-block;
width: 30px;
height: 14px;
& input {
opacity: 0;
width: 0;
height: 0;
}
& .slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #ccc;
transition: 0.4s;
border-radius: 34px;
}
& .slider:before {
position: absolute;
content: '';
height: 8px;
width: 8px;
left: 4px;
bottom: 3px;
background-color: white;
-webkit-transition: 0.4s;
transition: 0.4s;
border-radius: 50%;
}
& input:checked + .slider {
background-color: var(--lightGreen);
}
& input:focus + .slider {
box-shadow: 0 0 1px var(--lightGreen);
}
& input:checked + .slider:before {
-webkit-transform: translateX(14px);
-ms-transform: translateX(14px);
transform: translateX(14px);
}
}