forked from Czechitas-podklady-WEB/projekt-Chata-Arnica
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtoggle-switch.css
58 lines (51 loc) · 842 Bytes
/
toggle-switch.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
/*Simple css to style toggle switch*/
.theme-switch-wrapper {
display: flex;
align-items: center;
}
span {
margin-right: 0.5rem;
font-size: 1rem;
font-style: italic;
}
.theme-switch {
display: inline-block;
height: 28px;
position: relative;
width: 45px;
}
.theme-switch input {
display: none;
}
.slider {
background-color: #c8c8c8;
bottom: 0;
cursor: pointer;
left: 0;
position: absolute;
right: 0;
top: 0;
transition: 0.4s;
}
.slider:before {
background-color: #fff;
bottom: 4px;
content: '';
height: 20px;
left: 4px;
position: absolute;
transition: 0.4s;
width: 20px;
}
input:checked + .slider {
background-color: #62b283;
}
input:checked + .slider:before {
transform: translateX(16px);
}
.slider.round {
border-radius: 34px;
}
.slider.round:before {
border-radius: 50%;
}