fix(fonts): explicit font-family on title utilities + cascade conflicts
Реальные измерения через DevTools на staging выявили 3 бага после MR !47: Bug 1: text-title-md/lg/xl inherited Tektur от @nstart/ui Card parent. Handoff: 'Inter for all headings'. Computed: Tektur. Fix: добавил font-family: var(--font-sans) explicit на text-title-* и text-body/text-cell. После Stage 3.9 (nstart gone) можно убрать — body inherit будет достаточно. Bug 2: text-cap + font-mono cohabit (catalog scope chips, time-travel presets) → Tailwind v4 cascade order: font-mono идёт после text-cap в bundled CSS → JetBrains Mono перебивает Tektur. text-cap baked font-display, font-mono token redundant. Fix: codemod strip font-mono где есть text-cap (4 sites). Computed font-family теперь правильно Tektur. Bug 3: @nstart/ui PageHeader рендерил h1 'DICTIONARIES' в Tektur 36px/700 uppercase (font-primary text-4xl). Handoff page title: 17px/600 Inter normal case. Наш src/ui/components/page-header.tsx написан но не экспортирован через barrel — все routes резолвили PageHeader к nstart версии. Fix: добавил 'export { PageHeader }' override в src/ui/index.ts. Все 7 PageHeader usages (catalog/search/reviews/webhooks/outbox/ my-drafts/graph) теперь получат handoff-conformant heading. Bug 4 (small): catalog counter '37/37' использовал text-cap но это numeric value — handoff role text-mono (11px JetBrains Mono). Fix: text-cap → text-mono + tabular-nums для grid alignment. Verified via injected test elements + CDP computed styles: text-title-xl: 22/600 Inter text-title-lg: 17/600 Inter text-title-md: 15/600 Inter text-body: 13/400 Inter text-cell: 12.5/500 Inter text-mono: 11/500 JetBrains Mono text-cap: 10.5/600 Tektur Все 7 utilities точно matches handoff scale. Files: 4 modified. TS strict + 116 tests pass.
This commit is contained in:
@@ -253,7 +253,7 @@ function DictionariesPage() {
|
||||
/>
|
||||
</div>
|
||||
|
||||
<span className="text-cap text-mute whitespace-nowrap font-mono">
|
||||
<span className="text-mono text-mute whitespace-nowrap tabular-nums">
|
||||
{filtered.length}/{data.length}
|
||||
</span>
|
||||
|
||||
@@ -273,7 +273,7 @@ function DictionariesPage() {
|
||||
onClick={() => toggleScope(scope)}
|
||||
aria-pressed={selected}
|
||||
title={t(`dict.list.section.${scope}`)}
|
||||
className={`text-cap px-2 py-1 rounded-full flex items-center gap-1 border transition focus:outline-none focus:ring-2 focus:ring-accent/40 font-mono ${
|
||||
className={`text-cap px-2 py-1 rounded-full flex items-center gap-1 border transition focus:outline-none focus:ring-2 focus:ring-accent/40 ${
|
||||
selected
|
||||
? 'border-accent bg-accent-bg text-accent'
|
||||
: 'border-line hover:border-accent/60 text-ink'
|
||||
@@ -321,7 +321,7 @@ function DictionariesPage() {
|
||||
type="button"
|
||||
onClick={() => setBundle(selected ? undefined : bundle)}
|
||||
aria-pressed={selected}
|
||||
className={`text-cap px-2 py-1 rounded-sm flex items-center gap-1 border transition focus:outline-none focus:ring-2 focus:ring-accent/40 font-mono ${
|
||||
className={`text-cap px-2 py-1 rounded-sm flex items-center gap-1 border transition focus:outline-none focus:ring-2 focus:ring-accent/40 ${
|
||||
selected
|
||||
? 'border-accent bg-accent-bg text-accent'
|
||||
: 'border-line hover:border-accent/60 text-ink'
|
||||
|
||||
Reference in New Issue
Block a user