feat(theme): implement dual light/dark colour token system with WCAG AA contrast

Replace hard-coded hex values and ad-hoc `dark:` variants with a single
semantic token layer in `src/styles/global.css` (`@theme` + `html.dark`
re-declaration), so every component uses the same Tailwind class list in
both modes.

Key changes:
- Define semantic tokens (page, surface, ink, accent, edge, etc.) and raw
  ingredient palette (--color-spaghetti-*, --color-marinara*, etc.)
- Configure dual Shiki themes (light-plus / everforest-dark) with
  `defaultColor: false` for proper per-mode code block colours, replacing
  the old `.prose pre { #1f2937 !important }` hack
- Tint background particles to match the warm cream/espresso palette
  instead of pure black dots
- Document theme rules: add tokens not `dark:` variants, keep colour rules
  inside `@layer`, never target Tailwind utility classes with unlayered
  overrides, route prose colours through `--tw-prose-*` only

All text and interactive elements meet WCAG AA contrast (4.5:1 body, 3:1
large/interactive). Light mode is a warm cream plate with white cards; dark
mode is espresso (#140C08) with raised cards.
This commit is contained in:
spaghet committed 2026-11-12 20:48:10 -05:00
1 parent 8b6be36f7a
commit 9e157a4fa3
23 files changed
+544 -373

No files matched your search

+10 -10
View File
@@ -35,7 +35,7 @@ const detailsText = details(snapshot)
href={snapshot.statusPageUrl}
target="_blank"
rel="noopener noreferrer"
class="status group flex gap-2 justify-center sm:justify-end items-center hover:text-black dark:hover:text-white"
class="status group flex gap-2 justify-center sm:justify-end items-center text-ink-muted hover:text-ink"
data-status-root
data-status={state}
data-refresh-ms={REFRESH_MS}
@@ -58,37 +58,37 @@ const detailsText = details(snapshot)
}
.core {
background-color: #22c55e;
background-color: var(--color-status-ok);
transition: background-color 300ms ease-in-out;
}
.ping {
background-color: #86efac;
background-color: var(--color-status-ok-ping);
}
[data-status="degraded"] .core {
background-color: #f59e0b;
background-color: var(--color-status-warn);
}
[data-status="degraded"] .ping {
background-color: #fcd34d;
background-color: var(--color-status-warn-ping);
}
[data-status="down"] .core {
background-color: var(--color-marinara);
background-color: var(--color-status-down);
}
[data-status="down"] .ping {
background-color: var(--color-spaghetti-dark-red);
background-color: var(--color-status-down-ping);
}
[data-status="maintenance"] .core {
background-color: #4962bd;
background-color: var(--color-status-maint);
}
[data-status="maintenance"] .ping {
background-color: #93a5e0;
background-color: var(--color-status-maint-ping);
}
[data-status="unknown"] .core {
background-color: #9ca3af;
background-color: var(--color-status-unknown);
}
[data-status="unknown"] .ping {
display: none;