Skip to content

fix(ui): remove self-referential --shadow-*/--tracking-normal declarations in @theme inline - #1247

Open
rawdaymx wants to merge 1 commit into
ChatbotXIO:mainfrom
rawdaymx:fix/theme-shadow-tracking-circular-refs
Open

rawdaymx wants to merge 1 commit into
ChatbotXIO:mainfrom
rawdaymx:fix/theme-shadow-tracking-circular-refs

Conversation

@rawdaymx

Copy link
Copy Markdown
Contributor

Fixes #1241

What changed

@theme inline declared nine custom properties (--tracking-normal, --shadow-2xl through
--shadow-2xs) as var() references to themselves. Per the CSS custom-properties spec, a
property that references itself is invalid at computed-value time and falls back to the
property's initial value (none for box-shadow, normal for letter-spacing) — so every
shadow-*/tracking-* utility, including button.tsx's own shadow-xs, rendered with no
visible effect.

This PR is a pure deletion of the nine circular lines. With them gone, Tailwind CSS 4.3.2's own
built-in defaults (tailwindcss/theme.css) apply automatically.

Verification

Compiled default.css with Tailwind CSS 4.3.2 (@tailwindcss/postcss) against a template using
shadow-xs and tracking-wide, before and after:

before after
.shadow-xs compiled box-shadow unresolvable var(--shadow-xs), computed none 0 1px 2px 0 rgb(0 0 0 / 0.05) (real shadow)
--tracking-normal var(--tracking-normal) (circular) 0em
.tracking-wide computed letter-spacing normal calc(0em + 0.025em)

pnpm --filter @chatbotx.io/ui check-types and pnpm --filter @chatbotx.io/ui test both pass
(13/13 test files, 56/56 tests) against this change.

Note

If the intent was custom (non-default) shadow/tracking values rather than Tailwind's stock
defaults, the maintainer may prefer literal values instead of a plain deletion — happy to adjust.

@github-actions github-actions Bot added the bug Something isn't working as expected label Sep 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working as expected

Projects

None yet

1 participant