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:
1 parent
8b6be36f7a
commit
9e157a4fa3
23 files changed
+544
-373
No files matched your search
@@ -31,6 +31,6 @@ const doc = entry
|
||||
</div>
|
||||
</TopLayout>
|
||||
<BottomLayout>
|
||||
<article class="animate prose dark:prose-invert text-spaghetti-brown/100 dark:text-spaghetti-cream" set:html={doc.rendered?.html}></article>
|
||||
<article class="animate prose dark:prose-invert text-ink" set:html={doc.rendered?.html}></article>
|
||||
</BottomLayout>
|
||||
</PageLayout>
|
||||
Reference in new issue
Block a user