blob: 4b2c63724d9435e01e9f073612be90a873d434fe (
plain)
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
|
.toggle-hidden-block {
clip: rect(0 0 0 0);
clip-path: inset(50%);
height: 1px;
overflow: hidden;
position: absolute;
white-space: nowrap;
width: 1px;
}
.toggle-wrapper {
width: 4rem;
display: block;
}
.toggle {
background: var(--baseColor);
border-radius: 40px;
padding: 0.5rem;
position: relative;
transition: background 0.5s ease;
cursor: pointer;
}
.toggle::before {
content: "";
display: block;
height: 1.22rem;
width: 1.22rem;
border-radius: 30px;
background: var(--headsColor);
position: absolute;
top: 0.33rem;
z-index: 2;
transform: translate(0);
transition: transform 0.5s ease;
}
.toggle__dark::before {
transform: translateX(1.8rem);
}
.toggle input {
opacity: 0;
position: absolute;
top: 0;
}
.toggle-icons {
display: flex;
justify-content: space-between;
align-items: center;
height: 100%;
margin: 0 5px;
}
.toggle .toggle-icons svg {
fill: var(--headsColor);
height: 0.9rem;
width: 0.9rem;
z-index: 0;
}
|