feat: introduce mathematical type scale with single-source-of-truth typography tokens

Define a major-third (1.25) type scale as CSS custom properties in the tokens
layer (--text-2xs through --text-5xl), along with line-height (--leading-*),
font-weight (--font-*), and letter-spacing (--tracking-*) tokens. Migrate all
28 core CSS files from ad-hoc values to token references with clamp()-based
responsive scaling for headings. Add TypographyTokenContractTest to enforce
token-only usage via grep-based assertions.

Task run: UI-TYPOGRAPHY-SCALE-001

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-22 15:47:55 +01:00
parent cf8c59d3f8
commit e145b7d089
30 changed files with 390 additions and 146 deletions

View File

@@ -7,9 +7,9 @@
gap: 0.35em;
padding: 0.15em 0.6em;
border-radius: 999px;
font-size: 0.85em;
font-weight: 400;
line-height: 1.2;
font-size: 0.85em; /* em-relative sizing — intentional, scales with parent */
font-weight: var(--font-regular);
line-height: var(--leading-tight);
border: 1px solid transparent;
white-space: nowrap;
}
@@ -26,12 +26,12 @@
align-items: center;
justify-content: center;
color: inherit;
line-height: 1;
font-size: 10px;
line-height: var(--leading-none);
font-size: 10px; /* icon-font metric — intentional px */
}
.badge .badge-copy-icon .bi {
font-size: 0.95em;
font-size: 0.95em; /* em-relative sizing — intentional, scales with parent */
}
.badge .badge-copy-icon .bi-check2 {