From 204f2b424b7b42244fe55e0e25ee9a25266d180c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20H=C3=A4user?= <13727823+Herr-Dante@users.noreply.github.com> Date: Mon, 16 Nov 2026 15:45:17 +0100 Subject: [PATCH] Soften text and headings in dark mode Near-white #F8F9FA looked glaring on the dark background. Dark mode now uses #DAE0E4, the light divider color of the byro palette, for text (11.6:1 on #212529). Headings are one weight step lighter in dark mode, because light text on a dark background looks heavier. --- static/css/site.css | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/static/css/site.css b/static/css/site.css index 648df20..9f60e43 100644 --- a/static/css/site.css +++ b/static/css/site.css @@ -18,6 +18,9 @@ --fg-muted: #56616b; --border: #dae0e4; --shadow: 0 1px 2px rgb(33 37 41 / 6%), 0 12px 32px rgb(33 37 41 / 10%); + --h1-weight: 750; + --h2-weight: 700; + --h3-weight: 650; --radius: 12px; --gutter: 16px; color-scheme: light dark; @@ -29,10 +32,14 @@ --bg: #212529; --bg-alt: #1a1d20; --brand-surface: #17364e; - --fg: #f8f9fa; + --fg: #dae0e4; --fg-muted: #adb5bd; --border: #343a40; --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 12px 32px rgb(0 0 0 / 35%); + /* Light text on a dark background looks heavier, so headings get lighter. */ + --h1-weight: 700; + --h2-weight: 650; + --h3-weight: 600; } } @@ -72,17 +79,17 @@ h3 { h1 { font-size: clamp(1.75rem, 1.2rem + 3vw, 3.25rem); - font-weight: 750; + font-weight: var(--h1-weight); } h2 { font-size: clamp(1.6rem, 1.3rem + 1.4vw, 2.2rem); - font-weight: 700; + font-weight: var(--h2-weight); } h3 { font-size: 1.15rem; - font-weight: 650; + font-weight: var(--h3-weight); } p {