Tokens ποΈ
This page documents the design tokens powering this site. All tokens are CSS
custom properties defined per-theme in globals.css and consumed via
Tailwind CSS v4.
Backgrounds
Background tokens control surface hierarchy. They adapt across all three themes (light, dim, dark).
Usage in Tailwind: bg-(--color-bg-panel), bg-(--color-bg-hover), etc.
Colors
Ink
Text colors are contrast-tuned per theme so that primary ink meets WCAG AA against every background token.
Accent
The accent palette (teal) is used for interactive elements, links, and highlights.
Semantic
Info, success, warning, and danger each have a foreground and a light background
variant, used in components like Panel and form validation.
Themes
The site supports three themes β light, dim, and dark β controlled
by a data-theme attribute on <html>. Each theme redefines the full set of
CSS custom properties, so components never need conditional logic for theming.
Approach
All design tokens live in src/styles/globals.css as CSS custom properties,
consumed through Tailwind v4's bg-(--color-*) / text-(--color-*) shorthand.
This gives us:
- Zero runtime cost β no JavaScript color derivation or CSS-in-JS overhead
- Multi-theme support β adding a theme means adding one CSS block
- Tailwind integration β tokens work with all Tailwind utilities, responsive prefixes, and hover/focus states out of the box
More complex scenarios can use goober for CSS-in-JS.