0003 — Units, spacing, tokens and "no overwrite"
docs/decisions/0003-units-spacing-and-no-overrides.md
- Status: accepted — enforcement in
check-tokenswaits until the designer has reviewed the tokens - Date: 2026-10-12
- Decided by: Wunwan (designer)
- Migrated from: Claude memory,
component-migration-decisions
Decision
- Units. The designer thinks and reads in px; code stores rem, with px shown beside every value. Console pages display px. Components never contain raw units.
- Spacing. The Tailwind 4px grid, whole steps only (
gap-1, nevergap-1.5). The fractional uses get rounded to the nearest 4px, with the changes listed for approval. - Arbitrary values only for page and section layout in screens (widths, max-widths, grid columns) — never in
src/lib/components, and never for colour, type, line height, radius, shadow or spacing. - No overwrite. Components take no
classNameorstyle; a new look is a new variant. Type and spacing come from fixed scales only. - Tokens. Micro type 8px → about 10px. Fonts: Geist and IBM Plex Mono only (Inter dropped). Radius 1px and 2px fold into 4px.
- Source of truth. Figma is no longer used:
src/styles/tokens.cssis the source of truth. Its "change it in Figma" header and the Figma branch of/import-design-systemare obsolete. - Order of work. Audit every component first (one report), then migrate in dependency order, Button first. Scope: lib basics, Neural Nova composites, and screen-local pieces (reused ones move up).