fix(ui): tailwind-merge стрипал text-body — buttons ушли в 16px inherited

CRITICAL bug — на staging buttons рендерились в 16px вместо handoff
workhorse 13px. UpdateBanner secondary buttons показывали invisible
текст (text-ink overrode by inherited text-on-accent от parent banner).

Root cause:
  buttonVariants base = 'rounded-md text-body font-medium ...'
  primary variant     = 'bg-navy text-on-accent ...'

tailwind-merge default config pattern-matches `text-*` как ОДНУ группу
(color). Видя `text-body text-on-accent` он считал это конфликтом двух
colors → keep last → text-on-accent остаётся, text-body стрипается.
Result: button теряет font-size → inherit body 16px.

Fix: extendTailwindMerge регистрирует наши custom semantic typography
utilities (text-body/cell/mono/cap/title-*) в группе font-size (отдельной
от colors). twMerge теперь знает `text-body text-on-accent` это size +
color, обе сохраняются.

Also: text-mono/text-cap в font-family группе (они baked Mono/Tektur)
— fix конфликт с font-mono/font-display tokens если кто-то их случайно
combined.

Verified в preview: 'Sign in' button class теперь содержит text-body,
computed fontSize: 13px (вместо 16px).

Plus CI: release job image node:22-alpine → repo.nstart.cloud/library/
node:22-alpine (Docker Hub rate-limited, mirror используется во всех
других jobs).
This commit is contained in:
Zimin A.N.
2026-05-11 15:45:27 +03:00
parent 7a3b31b957
commit 9e2d985485
2 changed files with 33 additions and 3 deletions
+1 -1
View File
@@ -393,7 +393,7 @@ trigger-deploy-prod:
# `[skip release]` и semantic-release пропустит этот commit (см. parserOpts).
release:
stage: release
image: node:22-alpine
image: repo.nstart.cloud/library/node:22-alpine
needs:
- job: trigger-deploy-staging
artifacts: false