From 951d233a6533e302215e14c056697554436efd54 Mon Sep 17 00:00:00 2001 From: Vinta Chen Date: Sun, 22 Mar 2026 14:27:41 +0800 Subject: [PATCH] refactor(css): extract font-size magic numbers into CSS custom properties Replace hardcoded font-size values (0.78rem, 0.76rem) with named tokens --text-label and --text-tag so they are easy to find and change in one place. Co-Authored-By: Claude --- website/static/style.css | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/website/static/style.css b/website/static/style.css index 1528ee6a..7fb12b7d 100644 --- a/website/static/style.css +++ b/website/static/style.css @@ -35,6 +35,8 @@ --text-sm: 0.95rem; --text-base: 1rem; --text-lg: 1.125rem; + --text-label: 0.78rem; + --text-tag: 0.76rem; } html { @@ -181,7 +183,7 @@ kbd { } .hero-brand-mini { - font-size: 0.78rem; + font-size: var(--text-label); font-weight: 800; letter-spacing: 0.04em; color: var(--hero-muted); @@ -244,7 +246,7 @@ kbd { .hero-kicker, .section-label { margin-bottom: 0.9rem; - font-size: 0.78rem; + font-size: var(--text-label); font-weight: 800; letter-spacing: 0.04em; } @@ -759,7 +761,7 @@ th[data-sort].sort-asc::after { background: var(--accent-soft); color: var(--accent-deep); padding: 0.34rem 0.68rem; - font-size: 0.76rem; + font-size: var(--text-tag); font-weight: 700; letter-spacing: 0.02em; cursor: pointer;