Skip to content

fix(theme): replace deprecated bare tailwind aliases - #455

Merged
IgorShevchik merged 1 commit into
mainfrom
sync/nuxt-e2a253ec
Aug 21, 2026
Merged

fix(theme): replace deprecated bare tailwind aliases#455
IgorShevchik merged 1 commit into
mainfrom
sync/nuxt-e2a253ec

Conversation

@IgorShevchik

Copy link
Copy Markdown
Collaborator

Linked issue

Sync with nuxt/ui@v4 — three contiguous commits (§6 4b): e2a253ec · d4f2ca02 (nuxt/ui#6865) · a7f26a32 (no-op).

Type of change

  • Bug fix (a non-breaking change that fixes an issue)
  • Chore (updates to the build process or auxiliary tools and libraries)

Description

The alias rename, adapted

Tailwind v4 keeps the v3 bare spellings working as deprecated aliases. Upstream replaces the two it used — backdrop-blurbackdrop-blur-sm and roundedrounded-sm. The first is safe here; the second is not, and the difference does not show up in the diff.

The bare aliases are hardcoded, the named ones read a theme variable. Compiled with this repo's own Tailwind 4.3.3:

.backdrop-blur     => blur(8px)              .rounded      => 0.25rem
.backdrop-blur-sm  => blur(var(--blur-sm))   .rounded-sm   => var(--radius-sm)

--blur-sm is Tailwind's own 8px and this fork does not override the blur scale, so that rename is exact. --radius-sm is 8px here — src/runtime/air-design-tokens/tw-style/radius.css replaces the whole radius scale with the Air design system's. Taking upstream's line verbatim would have doubled the corner radius on every InputDate and InputTime segment, with no test to notice.

The same file defines --radius-2xs: 4px, which is exactly what bare rounded emits, so rounded-2xs is the value-preserving name — and it agrees with the design system's own field radius (--ui-field-border-radius: var(--ui-border-radius-2xs), also 4px). A deprecation cleanup preserves the value, not the class name.

Applied to every bare occurrence, a larger set than upstream's because two files are fork-local:

file change n
src/theme/header.ts backdrop-blur-sm 1
src/theme/table.ts backdrop-blur-sm 4
src/theme/table-wrapper.ts backdrop-blur-sm 6
src/theme/input-date.ts roundedrounded-2xs 1
src/theme/input-time.ts roundedrounded-2xs 1

One of table-wrapper.ts's six is inside a commented-out line, changed with the rest so the comment does not read as a different rule than the three live ones beside it. Two docs examples carried the same aliases and are fixed here too. chat-prompt.ts and content/content-toc.ts needed nothing — neither of our copies contains backdrop-blur.

Deliberately untouched: bare ring, which is not deprecated in v4 (.ring and .ring-1 compile to the identical declaration), and outline-none, which in v4 is a real utility meaning outline-style: none — it is outline-hidden that replaced v3's meaning. Both are questions about intent rather than alias renames, and upstream's commit touches neither.

e2a253ec — focus on the toggle button animation

Swaps class="outline-none" for tabindex="-1" on the three motion.line elements of the animated hamburger icon. The two are not variants of each other: outline-none hides the focus ring and leaves the element in the tab order, so the lines stayed focusable with nothing left to show for it. Only one of upstream's two files exists here — searching for motion-v across docs/app, playgrounds and src returns this example and prose/Img.vue, which has no focusable children to fix.

a7f26a32 — no-op

A Nuxt UI site joining upstream's showcase gallery. Same call as five earlier showcase commits. The one that was not a no-op, f6d188bd, introduced screenshotOptions; this one only uses it, and the field is already supported here.

Verification

Against output, not source:

  • The shipped stylesheet resolves .backdrop-blur-sm to blur(var(--blur-sm)) with --blur-sm:8px, and .rounded-2xs to var(--radius-2xs) with --radius-2xs:4px — identical rendering to what they replaced. The same file shows --radius-sm:8px, which is the divergence above.
  • Snapshots moved 854 lines removed / 854 added; after normalising the two renamed tokens, zero lines differ.
  • Across 204 prerendered pages, no class= attribute carries a bare alias any more, and the header example's payload carries three tabindex="-1" and zero outline-none.
  • Gate with CI=true: dev:prepare · lint · typecheck · test (6870 passed, 6 skipped, 302 files) · build · docs:generate (1259 routes).

Ledger: cursor → a7f26a32, three entries with their .sync/log/ journals, parity snapshot refreshed (one line, zero package differences).

Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

Generated by Claude Code

Ports three upstream commits, contiguous in `v4` (§6 4b):
`e2a253ec` · `d4f2ca02` (nuxt/ui #6865) · `a7f26a32` (no-op).

**The alias rename, adapted.** Tailwind v4 keeps the v3 bare spellings working
as deprecated aliases. Upstream replaces the two it used — `backdrop-blur` →
`backdrop-blur-sm` and `rounded` → `rounded-sm`. The first is safe here; the
second is not, and the difference is not visible in the diff.

The bare aliases are hardcoded, the named ones read a theme variable. Compiled
with this repo's own Tailwind 4.3.3:

    .backdrop-blur     => blur(8px)              .rounded      => 0.25rem
    .backdrop-blur-sm  => blur(var(--blur-sm))   .rounded-sm   => var(--radius-sm)

`--blur-sm` is Tailwind's own 8px and this fork does not override the blur
scale, so that rename is exact. `--radius-sm` is **8px** here:
`air-design-tokens/tw-style/radius.css` replaces the whole radius scale with the
Air design system's. Taking upstream's line verbatim would have doubled the
corner radius on every InputDate and InputTime segment, with no test to notice.

The same file defines `--radius-2xs: 4px`, which is exactly what bare `rounded`
emits, so `rounded-2xs` is the value-preserving name — and it agrees with the
design system's own field radius (`--ui-field-border-radius:
var(--ui-border-radius-2xs)`, also 4px). A deprecation cleanup preserves the
value, not the class name.

Applied to every bare occurrence, a larger set than upstream's because two of
the files are fork-local: `header.ts` (1), `table.ts` (4), `table-wrapper.ts`
(6, one inside a commented line so it does not drift from the three live rules
beside it), `input-date.ts` (1), `input-time.ts` (1), plus two docs examples
carrying the same aliases. `chat-prompt.ts` and `content/content-toc.ts` needed
nothing — neither of our copies contains `backdrop-blur`.

Deliberately untouched: bare `ring`, which is **not** deprecated in v4 (`.ring`
and `.ring-1` compile to the identical declaration), and `outline-none`, which
in v4 is a real utility meaning `outline-style: none` — that is `outline-hidden`
replacing v3's meaning, a question about intent rather than an alias rename.
Upstream's commit touches neither.

**`e2a253ec`** swaps `class="outline-none"` for `tabindex="-1"` on the three
`motion.line` elements of the animated hamburger icon. The two are not variants
of each other: `outline-none` hides the focus ring and leaves the element in the
tab order, so the lines stayed focusable with nothing left to show for it. Only
one of upstream's two files exists here; searching for `motion-v` across
`docs/app`, `playgrounds` and `src` returns this example and `prose/Img.vue`,
which has no focusable children to fix.

**`a7f26a32`** is a no-op: a Nuxt UI site joining upstream's showcase gallery.
Same call as five earlier showcase commits. The one that was not a no-op,
`f6d188bd`, introduced `screenshotOptions`; this one only uses it, and the field
is already supported here.

Verified against output, not source:

- The shipped stylesheet resolves `.backdrop-blur-sm` to `blur(var(--blur-sm))`
  with `--blur-sm:8px`, and `.rounded-2xs` to `var(--radius-2xs)` with
  `--radius-2xs:4px` — byte-identical rendering to what they replaced. The same
  file shows `--radius-sm:8px`, which is the divergence spelled out above.
- Snapshots moved 854 lines removed / 854 added; after normalising the two
  renamed tokens, **zero** lines differ.
- Across 204 prerendered pages, no `class=` attribute carries a bare alias any
  more, and the header example's payload carries three `tabindex="-1"` and zero
  `outline-none`.
- Gate with `CI=true`: `dev:prepare` · `lint` · `typecheck` · `test`
  (6870 passed, 6 skipped, 302 files) · `build` · `docs:generate` (1259 routes).

Ledger: cursor → `a7f26a32`, three entries, parity snapshot refreshed (one line,
zero package differences).
@IgorShevchik
IgorShevchik merged commit 3b1b017 into main Aug 21, 2026
1 check passed
@IgorShevchik
IgorShevchik deleted the sync/nuxt-e2a253ec branch August 21, 2026 06:17
IgorShevchik added a commit that referenced this pull request Aug 21, 2026
#455 (#456)

The three entries were written with `pending-merge` because the PR that carried
them had not merged yet; they now point at #455 and its squash SHA
`3b1b017e`. No entry in the ledger is left unreconciled.

Bookkeeping only — no source, test or docs change.

Co-authored-by: Shevchik Igor <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants