typography-system — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited typography-system (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
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.
skills/frontend-design/design-foundation first (or create the type tokens as its first slice).skills/frontend-design/color-system — fix the pairs you touch here; send palette-wide work there.skills/frontend-design/visual-hierarchy-refactoring.font-size:\s*[\d.]+(px|rem), Tailwind text-(xs|sm|base|lg|xl|\dxl) and arbitrary text-\[. Distinct count >8–10 = sprawl; record the list with frequencies.font-family|@font-face|fonts.googleapis|next/font and check tailwind.config.* / @theme for fontFamily. Count families and loaded weights.line-height|leading- and max-width.*ch|max-w-prose.design-foundation ran, extend its file; never start a parallel system.Ask in one batch, only what's missing: brand feel in a few words (or "pick for me"), and keep current fonts or open to change? Infer density from the code, base size 16px unless dense-data (then 14px body is acceptable). Don't stall — with visible screens, state assumptions and build.
Choose the ratio by product density (the core decision rule):
| Product | Ratio | Why |
|---|---|---|
| Dense data app, dashboards, admin | 1.125–1.2 (major second) | Many levels must fit without giant headings |
| Standard product UI / SaaS | 1.25 (major third) | Balanced; the default when unsure |
| Marketing site, landing pages | 1.25–1.333 | Headlines need presence |
| Editorial / brand-heavy, big heroes | 1.414–1.618 | Few levels, dramatic jumps |
Generate from base × ratio^n, then snap to sensible pixels (a 1.25 scale from 16px → 16, 20, 25, 31, 39, 49, 61; round as needed). Add xs(12) and sm(14) below base for captions/labels. Cap the scale at the largest size actually used — don't ship a 76px display token to a settings app.
Pair line-height inversely with size: body 1.5–1.7, subheads 1.3, large headings 1.1–1.2, captions/labels 1.4. Ship line-height inside the size token (Tailwind fontSize tuples do this natively).
Fluid headings: for sizes ≥ ~31px, use clamp(min, preferred vw formula, max) instead of per-breakpoint overrides. Body text stays fixed (16px) — never fluid below the base.
Fonts: limit to ≤2 families, 3–4 weights (400/500/600/700 subset). If choosing: pick a workhorse UI sans (variable font if available) for body, optionally one display font for headings that matches the stated feel. Load via the framework's optimizer (next/font etc.) or preload + font-display: swap. Pairing table and font-feature details: references/type-details.md.
fontSize: {
xs: ['0.75rem', { lineHeight: '1.4' }], // 12 — captions, labels
sm: ['0.875rem', { lineHeight: '1.5' }], // 14 — secondary UI text
base: ['1rem', { lineHeight: '1.6' }], // 16 — body
lg: ['1.125rem', { lineHeight: '1.6' }], // 18 — lead paragraphs
xl: ['1.25rem', { lineHeight: '1.3', fontWeight: '600' }], // 20 — h4/h5
'2xl': ['1.5625rem', { lineHeight: '1.3', fontWeight: '600' }], // 25 — h3
'3xl': ['clamp(1.6rem, 1.2rem + 1.6vw, 1.9375rem)', { lineHeight: '1.2', fontWeight: '700' }], // h2
'4xl': ['clamp(1.9rem, 1.3rem + 2.4vw, 2.4375rem)', { lineHeight: '1.1', fontWeight: '700' }], // h1
}@theme / CSS variables).p, labels, buttons) — not one-off classes per page.max-width: 65ch on long-form containers.Deliver code plus this summary:
## Type tokens
[file path + full code in the project's system]
## Scale decision
- Density: [dense/standard/marketing/editorial] — evidence: [what you saw]
- Ratio: [x] · Base: [16px] · Levels: [list, snapped px values]
- Fonts: [family/weights] — [kept existing / chosen because …] · Loading: [mechanism]
## Migration map
| Found | Count | Replace with |
| text-[15px], 15px | 12 | text-sm (14px) |
| ... |
## Applied now
[components/files actually restyled]
## Verify
[Contrast pairs checked with ratios; measure per breakpoint]font-display: swap or framework equivalentclamp() on large headings only; body size fixedskills/frontend-design/design-foundation (extends its typography slice); layout containers from skills/frontend-design/layout-system (measure lives there).skills/frontend-design/visual-hierarchy-refactoring (size/weight hierarchy) and skills/frontend-design/component-architecture (component text styles).skills/frontend-design/color-system and are audited by skills/frontend-design/accessibility-excellence.references/type-details.md — font pairing table by personality, variable fonts, OpenType features (tabular numbers, small caps), full article/UI typography patterns, and the complete ratio → scale tables. Read when choosing fonts or styling long-form content.~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.