-
Notifications
You must be signed in to change notification settings - Fork 0
/
style.css
86 lines (76 loc) · 1.55 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
:root {
--label: #111;
}
html, body {
margin: 0;
padding: 0;
height: 100%;
width: 100%;
}
.toggle {
display: none;
}
.toggle + label {
width: 42px;
height: 20px;
background: var(--label);
display: block;
position: relative;
border-radius: 30px;
padding: 2px;
transition: 200ms;
cursor: pointer;
background-image: url(./assets/sun.png);
background-position: right center;
background-repeat: no-repeat;
background-size: 20px;
background-position-x: 24px;
}
.toggle + label:before {
content: '';
position: absolute;
height: 20px;
width: 20px;
background: white;
display: block;
border-radius: 50%;
right: unset;
left: 2px;
top: 2px;
transition: 200ms;
}
.toggle:checked + label {
background-image: url(./assets/moon.png);
background-repeat: no-repeat;
background-position: left center;
background-size: 20px;
background-position-x: 2px;
}
.toggle:checked + label:before {
content: '';
left: calc(100% - 22px);
box-shadow: 0 4px 4px rgb(0 0 0 / 10%);
}
.theme-light {
--color-primary: #0060df;
--color-secondary: #fbfbfe;
--font-color: #000000;
}
.theme-dark {
--color-primary: #17ed90;
--color-secondary: #243133;
--font-color: #ffffff;
}
.container {
display: flex;
width: 100%;
height: 100%;
background: var(--color-secondary);
flex-direction: column;
justify-content: center;
align-items: center;
}
.container p {
color: var(--font-color);
text-align: center;
}