Foundations
Design tokens
195 tokens, all prefixed --lb-. Components consume semantic tokens only — never a palette ramp, never a raw value. That is what makes a re-theme a values-only change.
Colour
Defined in OKLCH so the greyscale ramp is perceptually even and the dark theme is a lightness inversion rather than a second hand-tuned palette. The system is achromatic by construction: chroma appears only where it carries meaning — status and syntax.
Semantic — surfaces
--lb-backgroundoklch(0.965 0 0)--lb-surfaceoklch(1 0 0)--lb-surface-2oklch(0.98 0 0)--lb-surface-3oklch(0.95 0 0)Semantic — ink
--lb-on-surfaceoklch(0.18 0 0)--lb-on-surface-2oklch(0.38 0 0)--lb-on-surface-3oklch(0.52 0 0)--lb-on-primaryoklch(0.98 0 0)Semantic — lines
--lb-outlineoklch(0.92 0 0)--lb-outline-softoklch(0.95 0 0)--lb-outline-strongoklch(0.62 0 0)Semantic — action
--lb-primaryoklch(0.18 0 0)--lb-primary-hoveroklch(0.28 0 0)--lb-primary-activeoklch(0.12 0 0)--lb-focusvar(--lb-primary)Status
--lb-successoklch(0.50 0.13 150)--lb-warningoklch(0.50 0.11 75)--lb-erroroklch(0.52 0.20 25)--lb-infooklch(0.50 0.16 250)Status surfaces
--lb-success-surfaceoklch(0.96 0.02 150)--lb-warning-surfaceoklch(0.96 0.03 75)--lb-error-surfaceoklch(0.96 0.02 25)--lb-info-surfaceoklch(0.96 0.02 250)The interactive-boundary rule
--lb-outline is a decorative hairline. The perimeter of any control a person must find and operate uses --lb-outline-strong, which clears 3:1 for WCAG 1.4.11. Drawing an input with --lb-outline looks correct and fails.
Type
One geometric sans at weights 400 and 500 for every human sentence; one monospace for everything machine-authored. Hierarchy comes from size, colour and space — weight 600 and above is not in the system.
Scale
| Token | Value |
|---|---|
--lb-type-display | 500 clamp(36px, 8vw, 56px)/1.05 var(--lb-font-sans) |
--lb-type-h1 | 500 clamp(32px, 6vw, 44px)/1.1 var(--lb-font-sans) |
--lb-type-h2 | 500 clamp(26px, 4vw, 32px)/1.15 var(--lb-font-sans) |
--lb-type-h3 | 500 22px/1.25 var(--lb-font-sans) |
--lb-type-h4 | 500 18px/1.3 var(--lb-font-sans) |
--lb-type-body-lg | 400 18px/1.55 var(--lb-font-sans) |
--lb-type-body | 400 17px/1.7 var(--lb-font-sans) |
--lb-type-body-sm | 400 15px/1.55 var(--lb-font-sans) |
--lb-type-body-xs | 400 14px/1.5 var(--lb-font-sans) |
--lb-type-label-lg | 500 15px/1.2 var(--lb-font-sans) |
--lb-type-label | 500 14px/1.2 var(--lb-font-sans) |
--lb-type-label-sm | 500 13px/1.2 var(--lb-font-sans) |
--lb-type-caption | 500 12px/1.4 var(--lb-font-sans) |
--lb-type-mono | 400 13px/1.65 var(--lb-font-mono) |
--lb-type-mono-sm | 500 12px/1.4 var(--lb-font-mono) |
--lb-type-mono-xs | 500 11px/1.4 var(--lb-font-mono) |
Space
Every spatial value is a multiple of 4. If a gap is not on this scale, it is a bug.
Rhythm
| Token | Value |
|---|---|
--lb-s-1 | 4px |
--lb-s-2 | 8px |
--lb-s-3 | 12px |
--lb-s-4 | 16px |
--lb-s-5 | 20px |
--lb-s-6 | 24px |
--lb-s-7 | 32px |
--lb-s-8 | 40px |
--lb-s-9 | 48px |
--lb-s-10 | 64px |
--lb-s-11 | 80px |
--lb-s-12 | 112px |
Layout
| Token | Value |
|---|---|
--lb-page | 600px |
--lb-wide | 1120px |
--lb-measure | 60ch |
--lb-gutter | 16px |
--lb-gutter-md | 24px |
--lb-control-h | 44px |
--lb-control-h-sm | 36px |
--lb-control-h-lg | 52px |
--lb-field-h | 48px |
--lb-tap-min | 44px |
Shape
Radius is bimodal and carries meaning: pill means press me, sm/md means type in me or read me, md/lg means I contain other controls. In a palette with no accent colour, shape is the affordance signal.
Radius
| Token | Value |
|---|---|
--lb-r-none | 0px |
--lb-r-xs | 6px |
--lb-r-sm | 10px |
--lb-r-md | 16px |
--lb-r-lg | 24px |
--lb-r-xl | 32px |
--lb-r-pill | 999px |
--lb-r-full | 50% |
Elevation
Separation is drawn, not implied: a 1px rule is the default boundary. Shadow is reserved for things that genuinely float. A component may not invent a shadow — if flat is wrong, the answer is the next tier up or a border.
Tiers
| Token | Value |
|---|---|
--lb-elev-flat | none |
--lb-elev-raised | 0 1px 2px oklch(0.18 0 0 / 0.04), 0 2px 8px oklch(0.18 0 0 / 0.04) |
--lb-elev-float | 0 2px 6px oklch(0.18 0 0 / 0.05), 0 12px 28px oklch(0.18 0 0 / 0.07) |
--lb-elev-popover | 0 4px 10px oklch(0.18 0 0 / 0.06), 0 18px 42px oklch(0.18 0 0 / 0.10) |
--lb-elev-modal | 0 8px 20px oklch(0.18 0 0 / 0.08), 0 36px 72px oklch(0.18 0 0 / 0.16) |
Motion
Motion explains state changes; it never entertains. Only transform, opacity and colour are animated — never height, width, top or left.
Duration and easing
| Token | Value |
|---|---|
--lb-dur-instant | 90ms |
--lb-dur-fast | 180ms |
--lb-dur-normal | 280ms |
--lb-dur-slow | 520ms |
--lb-ease | cubic-bezier(0.22, 1, 0.36, 1) |
--lb-ease-out | cubic-bezier(0.16, 1, 0.3, 1) |
--lb-ease-in-out | cubic-bezier(0.65, 0, 0.35, 1) |
--lb-ease-spring | cubic-bezier(0.34, 1.4, 0.64, 1) |
Full manifest
Machine-readable at dist/tokens.json, and as CSS at dist/tokens.css.