blob: 818a1ba55d890c5b4433cae46d97be729e20f0f1 (
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
63
64
65
66
67
68
69
70
|
.theme-toggle {
position: fixed;
top: 1rem;
right: 1rem;
background: none;
border: none;
padding: 0.5rem;
cursor: pointer;
z-index: 1000;
transition: transform 0.3s ease;
}
.theme-toggle:hover {
transform: scale(1.1);
}
.toggle-track {
width: 3rem;
height: 1.5rem;
background-color: var(--background-color);
border: 2px solid var(--primary-color);
border-radius: 1rem;
position: relative;
transition: background-color 0.3s ease;
}
.toggle-thumb {
width: 1.2rem;
height: 1.2rem;
background-color: var(--primary-color);
border-radius: 50%;
position: absolute;
top: 0.1rem;
left: 0.1rem;
transition: transform 0.3s ease;
display: flex;
align-items: center;
justify-content: center;
}
.theme-toggle.dark .toggle-thumb {
transform: translateX(1.5rem);
}
.theme-toggle svg {
width: 1rem;
height: 1rem;
color: var(--background-color);
}
@media (max-width: 768px) {
.theme-toggle {
top: 0.5rem;
right: 0.5rem;
}
.toggle-track {
width: 2.5rem;
height: 1.2rem;
}
.toggle-thumb {
width: 1rem;
height: 1rem;
}
.theme-toggle.dark .toggle-thumb {
transform: translateX(1.2rem);
}
}
|