Andrew Garman

// 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-99 Brightest paper
  • --ag-color-neutral-95 Paper (default surface)
  • --ag-color-neutral-90 Paper dark (lowered surface)
  • --ag-color-neutral-80 Pencil light
  • --ag-color-neutral-70 Pencil (border)
  • --ag-color-neutral-60 Mid warm tone
  • --ag-color-neutral-50 Ink faint (WCAG AA on paper)
  • --ag-color-neutral-40 Darker warm
  • --ag-color-neutral-30 Near-black warm
  • --ag-color-neutral-20 Ink (primary text)
  • --ag-color-neutral-10 Deep ink
  • --ag-color-neutral-05 Near black

Brand โ€” red-orange correction marker

  • --ag-color-brand-95 Lightest tint
  • --ag-color-brand-90 Light tint
  • --ag-color-brand-80 Soft
  • --ag-color-brand-70 Medium
  • --ag-color-brand-60 Strong
  • --ag-color-brand-50 Base brand (fill-loud)
  • --ag-color-brand-40 Dark
  • --ag-color-brand-30 Darker
  • --ag-color-brand-20 Deepest

Accent โ€” blue ink

  • --ag-color-accent-90 Light blue
  • --ag-color-accent-70 Mid blue
  • --ag-color-accent-50 Blue ink (links)
  • --ag-color-accent-40 Dark blue
  • --ag-color-accent-20 Deep blue

Success โ€” green ink

  • --ag-color-success-95 Light green tint
  • --ag-color-success-90 Green tint
  • --ag-color-success-70 Mid green
  • --ag-color-success-50 Green base
  • --ag-color-success-40 Dark green

Warning โ€” amber ink

  • --ag-color-warning-95 Light amber tint
  • --ag-color-warning-90 Amber tint
  • --ag-color-warning-70 Amber mid
  • --ag-color-warning-50 Amber base
  • --ag-color-warning-40 Amber 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-raised Card / raised surface
  • --ag-color-surface-default Page background
  • --ag-color-surface-lowered Recessed / darker inset
  • --ag-color-surface-border Default border color
  • --ag-color-text-normal Body text
  • --ag-color-text-quiet Secondary / muted text
  • --ag-color-text-link Hyperlinks
  • --ag-color-focus Focus ring color
  • --ag-color-brand-fill-quiet Brand fill โ€” subtle
  • --ag-color-brand-fill-normal Brand fill โ€” default
  • --ag-color-brand-fill-loud Brand fill โ€” primary CTA
  • --ag-color-brand-border-normal Brand border
  • --ag-color-success-fill-loud Success state fill
  • --ag-color-success-on-normal Success text on tint
  • --ag-color-warning-fill-loud Warning state fill
  • --ag-color-warning-on-normal Warning text on tint

Typography

Font Families

  • Special Elite โ€” display & headings --ag-font-family-heading alias: --font-display, --font-heading
  • Work Sans โ€” body & UI text --ag-font-family-body alias: --font-body
  • Courier New โ€” code & mono labels --ag-font-family-code alias: --font-mono
  • Caveat โ€” handwritten annotations --ag-font-family-longform alias: --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 --ag-font-size-3xs ~10px Below hard floor โ€” do not use
  • Aa โ€” 2xs --ag-font-size-2xs ~11px Below hard floor โ€” do not use
  • Aa โ€” xs --ag-font-size-xs ~13px Hard floor โ€” labels, annotations only
  • Aa โ€” s --ag-font-size-s ~14px Below 16px โ€” captions, meta only
  • Aa โ€” m --ag-font-size-m 16px Base โ€” minimum for body copy
  • Aa โ€” l --ag-font-size-l ~20px Subheadings, emphasized body
  • Aa โ€” xl --ag-font-size-xl ~25px h3 / section headings
  • Aa โ€” 2xl --ag-font-size-2xl ~32px h2 / page section titles
  • Aa โ€” 3xl --ag-font-size-3xl ~40px h1 / hero headings
  • Aa โ€” 4xl --ag-font-size-4xl ~51px Display โ€” very large
  • Aa โ€” 5xl --ag-font-size-5xl ~64px Display โ€” maximum

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-3xs 3xs 2px
  • --ag-space-2xs 2xs 4px
  • --ag-space-xs xs 8px
  • --ag-space-s s 12px
  • --ag-space-m m 16px
  • --ag-space-l l 24px
  • --ag-space-xl xl 32px
  • --ag-space-2xl 2xl 40px
  • --ag-space-3xl 3xl 48px
  • --ag-space-4xl 4xl 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-s s 2px offset, no blur โ€” tight cel
  • --ag-shadow-m m 3px offset, no blur โ€” default cel
  • --ag-shadow-l l 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-s s โ€” 2px
  • --ag-border-radius-m m โ€” 4px
  • --ag-border-radius-l l โ€” 8px
  • --ag-border-radius-pill pill โ€” 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)