Add ThemeToggle component

This commit is contained in:
thiloho
2023-05-18 20:20:43 +02:00
parent 21437ae15d
commit 40411fd328
11 changed files with 139 additions and 9 deletions

View File

@@ -6,6 +6,8 @@
--tertiary-background-color: hsl(0 0% 90%);
--text-color: hsl(0 0% 10%);
--accent-color: #1e40af;
color-scheme: light;
}
@media (prefers-color-scheme: dark) {
@@ -20,6 +22,26 @@
}
}
html.Light {
--background-color: hsl(0 0% 100%);
--secondary-background-color: hsl(0 0% 95%);
--tertiary-background-color: hsl(0 0% 90%);
--text-color: hsl(0 0% 10%);
--accent-color: #1e40af;
color-scheme: light;
}
html.Dark {
--background-color: hsl(0 0% 10%);
--secondary-background-color: hsl(0 0% 15%);
--tertiary-background-color: hsl(0 0% 20%);
--text-color: hsl(0 0% 90%);
--accent-color: #93c5fd;
color-scheme: dark;
}
html {
scroll-behavior: smooth;
}