From b184b043acb2b5a66f7fe349852b33aa53b37b40 Mon Sep 17 00:00:00 2001 From: Lilian <30466471+hlxid@users.noreply.github.com> Date: Sun, 15 Dec 2024 17:55:13 +0100 Subject: [PATCH] Add light mode --- static/main.css | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/static/main.css b/static/main.css index 49fbb7c..f7b394d 100644 --- a/static/main.css +++ b/static/main.css @@ -1,6 +1,7 @@ /* general page styling */ :root { --main-bg-color: #020404; + --main-bg-contrast-color: oklch(40% 0 0); --main-text-color: #efe3e3; --main-accent-color: #f9c827; --secondary-accent-color: #ff925f; @@ -8,6 +9,15 @@ scroll-behavior: smooth; } +@media(prefers-color-scheme: light) { + :root { + --main-bg-color: #fdfbfb; + --main-bg-contrast-color: oklch(90% 0 0); + --main-text-color: #101c1c; + --main-accent-color: #836400; + } +} + * { box-sizing: border-box; } @@ -306,7 +316,7 @@ footer { .calendar-date th { padding: 0.5em 1em; - background: oklch(40% 0 0); + background: var(--main-bg-contrast-color); } td { padding: 1em;