diff --git a/scripts/check-design-system.ts b/scripts/check-design-system.ts index 49121683..ac0a5a5d 100644 --- a/scripts/check-design-system.ts +++ b/scripts/check-design-system.ts @@ -125,6 +125,16 @@ for (const [theme, properties] of [ } } +// UI-03. A component token nobody reads is a second copy of a decision: +// the style that should use it repeats the formula instead, and a product +// that rebrands through the token sees nothing change. +const styleSources = cssSources.filter(({ file }) => file !== tokenFiles.component); +for (const token of REQUIRED_COMPONENT_TOKENS) { + if (!styleSources.some(({ source }) => source.includes(`var(${token}`))) { + failures.push(`component token ${token} is defined but no style reads it`); + } +} + const componentSource = await readFile(tokenFiles.component, "utf8"); if (!componentSource.includes("@media (forced-colors: active)")) { failures.push("forced-colors token fallback is missing"); diff --git a/src/presentation/styles/theme/primitives.css b/src/presentation/styles/theme/primitives.css index cfe29c31..9b6eff2d 100644 --- a/src/presentation/styles/theme/primitives.css +++ b/src/presentation/styles/theme/primitives.css @@ -12,19 +12,20 @@ } .ui-button { - @apply rounded-control bg-action px-4 py-2 font-semibold; + @apply rounded-control px-4 py-2 font-semibold; display: inline-flex; min-height: 2.75rem; align-items: center; justify-content: center; border: 0; - color: var(--color-on-action); + background: var(--button-primary-background); + color: var(--button-primary-content); text-decoration: none; cursor: pointer; } .ui-button:hover { - @apply bg-action-hover; + background: var(--button-primary-hover); } .ui-button:disabled { diff --git a/src/presentation/styles/theme/shell.css b/src/presentation/styles/theme/shell.css index 71bf0779..3d3530bd 100644 --- a/src/presentation/styles/theme/shell.css +++ b/src/presentation/styles/theme/shell.css @@ -180,11 +180,7 @@ .app-navigation__link.is-active { color: var(--color-action-hover); - background: color-mix( - in oklab, - var(--color-action) 14%, - var(--color-panel) - ); + background: var(--navigation-active-background); font-weight: 800; }