From 5391ce0b3e051d72ac1862e738727951e4a41ec9 Mon Sep 17 00:00:00 2001 From: Devon Campbell Date: Sun, 16 Jul 2023 13:16:49 -0500 Subject: [PATCH] Fix light mode color scheme --- assets/css/theme.css | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/assets/css/theme.css b/assets/css/theme.css index bce8ddb..9302d25 100644 --- a/assets/css/theme.css +++ b/assets/css/theme.css @@ -6,9 +6,18 @@ } :root { - --accent: rgb(62, 249, 138); - --accent-dark: #06cb56; + --accent: #890b63; + --accent-alt: #6b2957; + --text-over-background: #dcdcdc; --fancy-font-stack: BitBold, monospace; + --accent-over-background: rgb(62, 249, 138); +} + +@media (prefers-color-scheme: dark) { + :root { + --accent: rgb(62, 249, 138); + --accent-alt: #06cb56; + } } .sr-only:not(:focus):not(:active) { @@ -62,7 +71,7 @@ a { transition: 0.2s; } a:visited { - color: var(--accent-dark); + color: var(--accent-alt); } a:hover, a:visited:hover { @@ -96,7 +105,7 @@ body > nav a { body > nav a, body > nav a:visited { text-decoration: none; - color: var(--text); + color: var(--text-over-background); text-shadow: 3px 3px 0 black; } body > nav a[disabled] { @@ -112,6 +121,7 @@ h1 { position: relative; margin-top: 0; text-shadow: 0.1em 0 black; + color: var(--text-over-background); } h1 + article { margin-top: -1.9rem; @@ -157,9 +167,12 @@ body > footer { align-self: end; grid-row: 5; border: none; - color: var(--text); + color: var(--text-over-background); margin-top: 2rem; } +body > footer a, body > footer a:visited { + color: var(--accent-over-background); +} footer img { width: 5rem; } @@ -206,8 +219,8 @@ footer img { margin-bottom: 3rem; } body > nav a:hover:not([disabled]) { - text-shadow: 0 0 5px var(--accent), 0 0 25px var(--accent), - 0 0 50px var(--accent), 0 0 100px var(--accent); + text-shadow: 0 0 5px var(--accent-over-background), 0 0 25px var(--accent-over-background), + 0 0 50px var(--accent-over-background), 0 0 100px var(--accent-over-background); } } @@ -245,7 +258,7 @@ p:first-of-type { .glow { border: none; - box-shadow: 0 0 5px #fff, 0 0 20px 10px var(--accent); + box-shadow: 0 0 5px #fff, 0 0 20px 10px var(--accent-over-background); } .bg {