typography-system
Installation
SKILL.md
Typography System
Produce a working type scale for this codebase — tokens wired into the existing styling system and applied to real headings/body/UI text — not an essay about type. Governing principle: sizes come from a modular scale chosen for the product's density; readability constraints (line-height, measure, contrast) are non-negotiable and override aesthetics.
When to use / handoffs
- Use for type scales, font selection/loading, heading hierarchy, readability fixes, fluid type.
- No token infrastructure at all yet → run
skills/frontend-design/design-foundationfirst (or create the type tokens as its first slice). - Text colors failing contrast is shared ground with
skills/frontend-design/color-system— fix the pairs you touch here; send palette-wide work there. - Headings sized right but the page still scans poorly →
skills/frontend-design/visual-hierarchy-refactoring.
Step 1 — Inspect the codebase
- Count font sizes. Grep for
font-size:\s*[\d.]+(px|rem), Tailwindtext-(xs|sm|base|lg|xl|\dxl)and arbitrarytext-\[. Distinct count >8–10 = sprawl; record the list with frequencies. - Find the fonts. Grep for
font-family|@font-face|fonts.googleapis|next/fontand checktailwind.config.*/@themeforfontFamily. Count families and loaded weights. - Check line-height and measure. Grep
line-height|leading-andmax-width.*ch|max-w-prose. - Check existing tokens. If
design-foundationran, extend its file; never start a parallel system. - Classify the product's density from the screens themselves: data tables/dashboards/many controls = dense; landing/marketing = spacious; long-form reading = editorial.