Merge branch 'fix/font-cascade-handoff' into 'main'

fix(fonts): explicit font-family + cascade conflicts (browser-verified)

See merge request 2-6/2-6-4/terravault/ordinis!51
This commit is contained in:
Александр Зимин
2026-05-11 11:58:47 +00:00
4 changed files with 18 additions and 4 deletions
@@ -348,7 +348,7 @@ function QuickPresets({ onPick }: { onPick: (deltaMs: number) => void }) {
key={p.key} key={p.key}
type="button" type="button"
onClick={() => onPick(p.deltaMs)} onClick={() => onPick(p.deltaMs)}
className="text-cap px-2.5 py-1 rounded-full border border-line hover:border-accent hover:bg-accent/4 font-mono text-ink transition-colors" className="text-cap px-2.5 py-1 rounded-full border border-line hover:border-accent hover:bg-accent/4 text-ink transition-colors"
> >
{p.label} {p.label}
</button> </button>
@@ -253,7 +253,7 @@ function DictionariesPage() {
/> />
</div> </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} {filtered.length}/{data.length}
</span> </span>
@@ -273,7 +273,7 @@ function DictionariesPage() {
onClick={() => toggleScope(scope)} onClick={() => toggleScope(scope)}
aria-pressed={selected} aria-pressed={selected}
title={t(`dict.list.section.${scope}`)} 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 selected
? 'border-accent bg-accent-bg text-accent' ? 'border-accent bg-accent-bg text-accent'
: 'border-line hover:border-accent/60 text-ink' : 'border-line hover:border-accent/60 text-ink'
@@ -321,7 +321,7 @@ function DictionariesPage() {
type="button" type="button"
onClick={() => setBundle(selected ? undefined : bundle)} onClick={() => setBundle(selected ? undefined : bundle)}
aria-pressed={selected} 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 selected
? 'border-accent bg-accent-bg text-accent' ? 'border-accent bg-accent-bg text-accent'
: 'border-line hover:border-accent/60 text-ink' : 'border-line hover:border-accent/60 text-ink'
+10
View File
@@ -182,7 +182,13 @@
* (e.g. `text-body font-medium text-ink`). НЕ накладывать font-mono/ * (e.g. `text-body font-medium text-ink`). НЕ накладывать font-mono/
* font-display/uppercase/tracking — они baked в соответствующие utility. */ * font-display/uppercase/tracking — они baked в соответствующие utility. */
/* font-family: var(--font-sans) explicit — наследование может ломаться когда
* титлы используются внутри @nstart/ui Card/PageHeader которые sеtают
* font-family: Tektur на parent. После Stage 3.9 (nstart removed) можно
* убрать font-family из этих utilities — body inherit будет достаточно. */
@utility text-title-xl { @utility text-title-xl {
font-family: var(--font-sans);
font-size: 22px; font-size: 22px;
font-weight: 600; font-weight: 600;
line-height: 1.2; line-height: 1.2;
@@ -190,6 +196,7 @@
} }
@utility text-title-lg { @utility text-title-lg {
font-family: var(--font-sans);
font-size: 17px; font-size: 17px;
font-weight: 600; font-weight: 600;
line-height: 1.25; line-height: 1.25;
@@ -197,18 +204,21 @@
} }
@utility text-title-md { @utility text-title-md {
font-family: var(--font-sans);
font-size: 15px; font-size: 15px;
font-weight: 600; font-weight: 600;
line-height: 1.3; line-height: 1.3;
} }
@utility text-body { @utility text-body {
font-family: var(--font-sans);
font-size: 13px; font-size: 13px;
font-weight: 400; font-weight: 400;
line-height: 1.45; line-height: 1.45;
} }
@utility text-cell { @utility text-cell {
font-family: var(--font-sans);
font-size: 12.5px; font-size: 12.5px;
font-weight: 500; font-weight: 500;
line-height: 1.35; line-height: 1.35;
+4
View File
@@ -38,6 +38,10 @@ export { Alert, type AlertProps } from './components/alert'
// TextArea override — shadcn с handoff tokens. Phase 3 migration step // TextArea override — shadcn с handoff tokens. Phase 3 migration step
// (Stage 3.8a). API совместим с @nstart/ui TextArea (label/hint/error). // (Stage 3.8a). API совместим с @nstart/ui TextArea (label/hint/error).
export { TextArea, type TextAreaProps } from './components/textarea' export { TextArea, type TextAreaProps } from './components/textarea'
// PageHeader override — @nstart/ui рендерил h1 в Tektur 36px/700 (text-4xl
// uppercase tracking-tight font-primary), что не соответствует handoff
// page title 17/600 Inter. Наша версия использует text-title-lg utility.
export { PageHeader } from './components/page-header'
// === Handoff design system primitives — новые компоненты без nstart-аналога === // === Handoff design system primitives — новые компоненты без nstart-аналога ===
export { Cap, type CapProps } from './components/cap' export { Cap, type CapProps } from './components/cap'