// design-tokens ยท ag-prefix ยท v1.0
Design Tokens
Living reference for all --ag-* CSS custom properties. Defined in
src/styles/ag-tokens.css using a three-layer cascade:
ag-color-palette โ ag-theme โ ag-theme-overrides. Theme switching is driven by [data-theme="dark"] on <html>.
Color Palette
Raw numeric scale โ lower number = darker. All values are warm-toned for the paper notebook
aesthetic. Defined in @layer ag-color-palette.
Neutral โ cream paper to near-black ink
-
--ag-color-neutral-99Brightest paper -
--ag-color-neutral-95Paper (default surface) -
--ag-color-neutral-90Paper dark (lowered surface) -
--ag-color-neutral-80Pencil light -
--ag-color-neutral-70Pencil (border) -
--ag-color-neutral-60Mid warm tone -
--ag-color-neutral-50Ink faint (WCAG AA on paper) -
--ag-color-neutral-40Darker warm -
--ag-color-neutral-30Near-black warm -
--ag-color-neutral-20Ink (primary text) -
--ag-color-neutral-10Deep ink -
--ag-color-neutral-05Near black
Brand โ red-orange correction marker
-
--ag-color-brand-95Lightest tint -
--ag-color-brand-90Light tint -
--ag-color-brand-80Soft -
--ag-color-brand-70Medium -
--ag-color-brand-60Strong -
--ag-color-brand-50Base brand (fill-loud) -
--ag-color-brand-40Dark -
--ag-color-brand-30Darker -
--ag-color-brand-20Deepest
Accent โ blue ink
-
--ag-color-accent-90Light blue -
--ag-color-accent-70Mid blue -
--ag-color-accent-50Blue ink (links) -
--ag-color-accent-40Dark blue -
--ag-color-accent-20Deep blue
Success โ green ink
-
--ag-color-success-95Light green tint -
--ag-color-success-90Green tint -
--ag-color-success-70Mid green -
--ag-color-success-50Green base -
--ag-color-success-40Dark green
Warning โ amber ink
-
--ag-color-warning-95Light amber tint -
--ag-color-warning-90Amber tint -
--ag-color-warning-70Amber mid -
--ag-color-warning-50Amber base -
--ag-color-warning-40Amber dark
Semantic Theme Tokens
Defined in @layer ag-theme. These flip automatically when [data-theme="dark"] is applied. Use these in components, never raw palette values.
-
--ag-color-surface-raisedCard / raised surface -
--ag-color-surface-defaultPage background -
--ag-color-surface-loweredRecessed / darker inset -
--ag-color-surface-borderDefault border color -
--ag-color-text-normalBody text -
--ag-color-text-quietSecondary / muted text -
--ag-color-text-linkHyperlinks -
--ag-color-focusFocus ring color -
--ag-color-brand-fill-quietBrand fill โ subtle -
--ag-color-brand-fill-normalBrand fill โ default -
--ag-color-brand-fill-loudBrand fill โ primary CTA -
--ag-color-brand-border-normalBrand border -
--ag-color-success-fill-loudSuccess state fill -
--ag-color-success-on-normalSuccess text on tint -
--ag-color-warning-fill-loudWarning state fill -
--ag-color-warning-on-normalWarning text on tint
Typography
Font Families
- Special Elite โ display & headings
--ag-font-family-headingalias:--font-display,--font-heading - Work Sans โ body & UI text
--ag-font-family-bodyalias:--font-body - Courier New โ code & mono labels
--ag-font-family-codealias:--font-mono - Caveat โ handwritten annotations
--ag-font-family-longformalias:--font-annotation
Font Size Scale
Major Second (ร1.125) scale anchored at 1rem (16px). Rule: nothing below 12px hard floor; body copy minimum 16px.
- Aa โ 3xs
- Aa โ 2xs
- Aa โ xs
- Aa โ s
- Aa โ m
- Aa โ l
- Aa โ xl
- Aa โ 2xl
- Aa โ 3xl
- Aa โ 4xl
- Aa โ 5xl
Spacing Scale
T-shirt scale multiplied by --ag-space-scale (default 1) for density control. Use
these for all margin, padding, and gap values.
-
--ag-space-3xs3xs 2px -
--ag-space-2xs2xs 4px -
--ag-space-xsxs 8px -
--ag-space-ss 12px -
--ag-space-mm 16px -
--ag-space-ll 24px -
--ag-space-xlxl 32px -
--ag-space-2xl2xl 40px -
--ag-space-3xl3xl 48px -
--ag-space-4xl4xl 64px
Shadows
Hard cel-shadows: offset with no blur, ink-colored. --ag-shadow-blur-scale: 0 collapses all blur to zero. Alias: --shadow-cel โ --ag-shadow-s.
-
--ag-shadow-ss 2px offset, no blur โ tight cel -
--ag-shadow-mm 3px offset, no blur โ default cel -
--ag-shadow-ll 4px offset, no blur โ lifted cel
Border Radius
Tight squares match the cel/sketch aesthetic. Alias: --radius-cel โ --ag-border-radius-s.
-
--ag-border-radius-ss โ 2px -
--ag-border-radius-mm โ 4px -
--ag-border-radius-ll โ 8px -
--ag-border-radius-pillpill โ 9999px
Legacy Aliases
Defined in @layer ag-theme-overrides. These map the old --paper, --ink, --brand-1, etc. names onto --ag-* semantic tokens. Theme switching
propagates through automatically. Prefer --ag-* tokens in new code.
| Alias | Points to |
|---|---|
--paper | --ag-color-surface-default |
--paper-dark | --ag-color-surface-lowered |
--ink | --ag-color-text-normal |
--ink-faint | --ag-color-text-quiet |
--pencil | --ag-color-surface-border |
--blue-ink | --ag-color-text-link |
--green-ink | --ag-color-success-on-normal |
--amber-ink | --ag-color-warning-on-normal |
--brand-1 | --ag-color-brand-fill-loud |
--shadow-cel | --ag-shadow-s |
--radius-cel | --ag-border-radius-s |
--font-display | --ag-font-family-heading |
--font-mono | --ag-font-family-code |
--font-size-1 | --ag-font-size-m (16px) |
--font-size-2 | --ag-font-size-l (~20px) |
--font-size-3 | --ag-font-size-xl (~25px) |
--font-size-4 | --ag-font-size-2xl (~32px) |
--font-size-5 | --ag-font-size-3xl (~40px) |