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

@@ -15,8 +15,8 @@
border-radius: 6px;
background: var(--app-card-background-color);
color: var(--app-muted-color);
font-size: 0.75rem;
line-height: 1;
font-size: var(--text-xs);
line-height: var(--leading-none);
padding: 0.2rem 0.4rem;
pointer-events: none;
}
@@ -28,13 +28,13 @@
border-radius: var(--app-border-radius);
text-align: center;
color: var(--app-muted-color);
font-size: 0.9rem;
font-size: var(--text-sm);
cursor: text;
}
.app-search-empty-state .bi-search {
display: inline-block;
font-size: 1.25rem;
font-size: var(--text-xl);
margin-bottom: 0.5rem;
color: var(--app-color);
}
@@ -57,7 +57,7 @@ ul.app-search-results > li > a {
}
ul.app-search-results .badge {
font-size: 10px;
font-size: 10px; /* icon-font metric — intentional px */
padding: 1px;
min-width: 18px;
text-align: center;
@@ -73,7 +73,7 @@ ul.app-search-results .badge {
ul.app-search-preview {
position: relative;
font-size: 11px;
font-size: var(--text-xs);
padding: 0 0 0 0;
margin: 0;
opacity: 0.75;
@@ -120,7 +120,7 @@ input#side-search {
--app-form-element-spacing-horizontal: 10px;
--app-form-element-spacing-vertical: 6px;
height: auto;
font-size: 13px;
font-size: var(--text-sm);
padding-right: 3rem;
margin-bottom:0;
}
@@ -160,18 +160,18 @@ ul.app-search-preview:has(li) {
.search-result-title {
font-weight: 600;
font-weight: var(--font-semibold);
text-decoration: none;
}
.search-result-desc {
margin: 0;
color: var(--app-muted-color);
font-size: small;
font-size: var(--text-sm);
}
.search-result-type {
color: var(--app-muted-color);
font-weight: 600;
font-weight: var(--font-semibold);
}
}