From bac0eb8ed91400fbaf58edc2c33fdc854f88db48 Mon Sep 17 00:00:00 2001 From: Joe Mou Date: Mon, 26 Jan 2026 18:10:01 -0500 Subject: Color schemes --- cgithub/static/style.css | 55 +++++++++++++++++++++++++++++++++--------------- 1 file changed, 38 insertions(+), 17 deletions(-) (limited to 'cgithub/static') diff --git a/cgithub/static/style.css b/cgithub/static/style.css index 5c27bbc..d21bd32 100644 --- a/cgithub/static/style.css +++ b/cgithub/static/style.css @@ -1,27 +1,42 @@ +:root { + color-scheme: light dark; + + --body-background: light-dark( + oklch(95% 0.01 250), + oklch(20% 0.01 250) + ); + + --text-color: light-dark( + oklch(5% 0.01 250), + oklch(90% 0.01 250) + ); + + --border-color: light-dark( + oklch(85% 0.01 250), + oklch(40% 0.01 250) + ); + + --shade-background: light-dark( + oklch(90% 0.01 250), + oklch(30% 0.01 250) + ); + + --link-color: light-dark( + oklch(50% 0.15 250), + oklch(60% 0.15 250) + ); +} + body { margin: 0 1rem; font-family: Helvetica, Arial, sans-serif; - - --border-color: #d0d7de; - --shade-background: #eeeeee; -} - -@media (prefers-color-scheme: dark) { - body { - background: #0d1117; - color: #e6edf3; - --border-color: #30363d; - } - a { - color: #4493f8; - } - .blob { - background: #161b22; - } + background: var(--body-background); + color: var(--text-color); } a { text-decoration: none; + color: var(--link-color); } body > header, .box { @@ -57,6 +72,12 @@ footer { vertical-align: text-bottom; } +@media (prefers-color-scheme: dark) { + .icon { + filter: brightness(0) invert(1); + } +} + .repo { margin-bottom: 1rem; font-size: 120%; -- cgit v1.3.1