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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
|
:root{
--dark-theme-check: 1;
--theme-color-check: 1;
--accent-color-check: 1;
--theme-hue: 90;
--accent-offset: 60;
--accent-hue: calc(var(--theme-hue) + var(--accent-offset));
/* Contrast hue - the color for hyperlinks and selection.
Default hue is 210, but we want it the +180 opposite hue of theme if there is a theme color.*/
--theme-contrast-hue: calc(calc(var(--theme-hue) + 180) * var(--theme-color-check));
--default-contrast-hue: calc(210 - calc(var(--theme-color-check) * 210));
--contrast-hue: calc(var(--theme-contrast-hue) + var(--default-contrast-hue));
--foreground-lightness: calc(10% + calc(var(--dark-theme-check) * 70%));
--background-lightness: calc(80% - calc(var(--dark-theme-check) * 70%));
--contrast-lightness: calc(30% + calc(var(--dark-theme-check) * 55%));
--foreground-theme-color: hsl(
var(--theme-hue),
calc(var(--theme-color-check) * 100%),
var(--foreground-lightness)
);
--background-theme-color: hsl(
var(--theme-hue),
calc(var(--theme-color-check) * 25%),
var(--background-lightness)
);
--foreground-accent-color: hsl(
var(--accent-hue),
calc(var(--accent-color-check) * 100%),
var(--foreground-lightness)
);
--background-accent-color: hsl(
var(--accent-hue),
calc(var(--accent-color-check) * 100%),
var(--background-lightness)
);
--contrast-color: hsl(var(--contrast-hue), 100%, var(--contrast-lightness));
}
::selection {
background-color: var(--contrast-color);
color: hsl(0, 0%, var(--background-lightness));
}
body {
color: var(--foreground-accent-color);
background-color: var(--background-theme-color);
}
p {
color: var(--foreground-theme-color);
text-indent: 4em;
}
p.header-sub-text {
font-size: 1.25em;
font-weight: bold;
text-indent: 0;
}
hr {
border-color: var(--foreground-accent-color);
}
nav {
color: var(--foreground-accent-color);
text-align: center;
}
ul {
text-indent: -2em;
font-size: 1.25em;
font-weight: bold;
}
li {
text-indent: 0em;
font-size: 1rem;
font-weight: normal;
}
a {
color: var(--contrast-color);
}
a:visited {
color: hsl(calc(var(--contrast-hue) + 60), 100%, var(--contrast-lightness))
}
a:hover {
color: hsl(calc(var(--contrast-hue) - 150), 100%, var(--contrast-lightness))
}
.dark-mode-container {
float: right;
}
input[type='checkbox'] {
border-color: var(--foreground-accent-color);
background-color: var(--background-accent-color);
}
|