-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmain.css
62 lines (52 loc) · 931 Bytes
/
main.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
/* Baseline */
body {
--bg: #fff;
--fg: #000;
color: var(--fg);
background-color: var(--bg);
}
body:has(#dark:checked) {
--bg: #000;
--fg: #fff;
}
/* Making the toggle a bit nicer */
#dark {
display: none;
}
#theme-toggle {
cursor: pointer;
text-decoration: underline;
}
/* Label switching support */
body {
--display-light: none;
--display-dark: initial;
}
body:has(#dark:checked) {
--display-light: initial;
--display-dark: none;
}
#theme-toggle span:first-of-type {
display: var(--display-light);
}
#theme-toggle span:last-of-type {
display: var(--display-dark);
}
/* Support for system theme */
@media (prefers-color-scheme: dark) {
body {
--bg: #000;
--fg: #fff;
--display-light: initial;
--display-dark: none;
}
body:has(#dark:checked) {
--bg: #fff;
--fg: #000;
--display-light: none;
--display-dark: initial;
}
}
footer {
margin-top: 2rem;
}