WORK-404
Setting up your dashboard 0 entities found · 9/32 branches scanned
ID:WORK-404Status:ready

Typography token contract

Extend the SPEC-048 TokenContract with a real typographic system. Today the contract carries only font.sans / font.mono — no scale, leading, weight, or tracking — so typographic identity (the primary differentiator for editorial/magazine themes) is not themeable. This is the gate for the SPEC-094 Tier 1 foundations.

Priority:highComplexity:moderateMilestone:v0.22.0Source:SPEC-094
claude/v0.22.0-theme-foundations View source

Criteria completion

Criteria completion: 0 of 4 (0%) checked; tracking started on Jun 12, no incremental history yet0%25%50%75%100%Jun 12Jun 15

Tracking started Jun 12 — check back for trends.

Branches 2
claude/v0.22.0-theme-foundations current ready
claude/work-404-typography-token-contract donemain done
History 1
  1. df1ffa9
    Created (ready)by bjornolofandersson

Scope

  • A modular type scale (e.g. text.xs … text.4xl), ideally ratio-derivable so a theme sets a base size + ratio rather than every step.
  • Line-height tokens (per-step, or tight/normal/relaxed).
  • Font-weight tokens.
  • Letter-spacing / tracking tokens.
  • A distinct display/heading family slot (font.display or font.serif — reserved per SPEC-051), separate from font.sans.
  • Mapping to --rf-* per the contract's flattening rule; updates to mergeTokenContracts, token-validate, and generateThemeStylesheet so the new leaves merge, reject typos, and emit CSS.

The Lumina refactor that consumes these is WORK-405; CSS generation is WORK-406.

Acceptance Criteria

  • TokenContract gains type-scale, line-height, font-weight, letter-spacing, and a display/heading family, each mapping to a documented --rf-* variable.
  • mergeTokenContracts, token-validate, and generateThemeStylesheet handle the new leaves (merge, reject unknown keys, emit CSS).
  • Lumina's tokens.ts populates the new tokens with values matching its current rendered typography (no visual change yet — consumption is WORK-405).
  • Token-contract docs updated with the new surface.

References

  • SPEC-094 · SPEC-048 · packages/types/src/token-contract.ts · packages/transform/src/token-merge.ts · generateThemeStylesheet in @refrakt-md/transform.