From 82c242d25cee340e7675d693708bff448aba1aa4 Mon Sep 17 00:00:00 2001 From: verdant Date: Sun, 10 May 2026 18:21:52 +0800 Subject: style: add dark mode switcher --- static/style.css | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'static/style.css') diff --git a/static/style.css b/static/style.css index a673a13..6a90c3c 100644 --- a/static/style.css +++ b/static/style.css @@ -4,6 +4,13 @@ --font-size-primary: 1.08rem; --font-size-secondary: 1.05rem; + --font-size-h1: calc(var(--font-size-primary) * 1.953125); /* ≈2.11rem ≈33.8px */ + --font-size-h2: calc(var(--font-size-primary) * 1.5625); /* ≈1.69rem ≈27.0px */ + --font-size-h3: calc(var(--font-size-primary) * 1.25); /* ≈1.35rem ≈21.6px */ + --font-size-h4: calc(var(--font-size-primary) * 1.0); /* ≈1.08rem ≈17.3px */ + --font-size-h5: calc(var(--font-size-primary) * 0.875); /* ≈0.945rem ≈15.1px */ + --font-size-h6: calc(var(--font-size-primary) * 0.75); + --body-bg-color: #fbf8f2; --bold-text-color: #1e1e1e; --body-text-color: #3d3a35; @@ -37,7 +44,12 @@ --svg-size: 0.85em; } - +h1 { font-size: var(--font-size-h1); font-weight: 700; line-height: 1.2; margin: 0.67em 0; } +h2 { font-size: var(--font-size-h2); font-weight: 600; line-height: 1.25; margin: 0.83em 0; } +h3 { font-size: var(--font-size-h3); font-weight: 600; line-height: 1.3; margin: 1em 0; } +h4 { font-size: var(--font-size-h4); font-weight: 600; line-height: 1.4; margin: 1.33em 0; } +h5 { font-size: var(--font-size-h5); font-weight: 500; line-height: 1.5; margin: 1.67em 0; text-transform: uppercase; } +h6 { font-size: var(--font-size-h6); font-weight: 500; line-height: 1.5; margin: 2em 0; color: #666; } p { font-size: var(--font-size-primary); -- cgit v1.2.3