Skip to content

Design tokens

All UI styling uses CSS custom properties declared in ./src/web/tokens.css. No component file contains hardcoded hex values, raw px sizes, or one-off radii — everything references a token.

Token groups

Colors (semantic)

TokenRole
--bg, --bg-basePage background
--bg-raisedRails, sections, inset surfaces
--bg-raised-2Hover / secondary button fill
--bg-elevatedCards (one step brighter than raised)
--borderDefault 1px separators
--border-strongCard outline / stronger edge
--accentPrimary accent (#7c6df0)
--accent-2Secondary accent (#4ecca3)
--text, --text-mutedForeground, secondary
--danger, --warnStatus hues

Status stripes

--stripe-danger, --stripe-warn, --stripe-ok, --stripe-accent, --stripe-neutral — saturated colors for 3 px left borders on cards. Bodies stay neutral; stripe + chip do the work.

Type scale

TokenSize
--fs-011 px
--fs-112 px
--fs-213 px
--fs-314 px
--fs-416 px
--fs-520 px

Spacing

--s-1 4 px · --s-2 8 px · --s-3 12 px · --s-4 16 px · --s-5 24 px · --s-6 32 px.

Controls & radii

  • --control-h 26 px, --control-pad-y 4 px, --control-pad-x 10 px.
  • --r-1 4 px, --r-2 6 px, --r-3 8 px.

Authoring rules

  • No raw hex/rgb in component styles.
  • No raw px for font sizes or spacings.
  • If you need a new color or size, add a token first and use it everywhere; don't one-off.

These rules are enforced culturally, not mechanically — but ./src/engineering-defaults/frontend.md ships the guidelines into every agent's system prompt so workers know the conventions.

Released under the FLL-1.2 License.