Skip to content

Bump vendored Tailwind to ^4.3.0 to fix spurious 'Unsupported bare value' warnings for --default() - #472

Merged
RobinMalfait merged 2 commits into
tailwindlabs:mainfrom
benface:bump-tailwind-4.3
Sep 1, 2026
Merged

RobinMalfait merged 2 commits into
tailwindlabs:mainfrom
benface:bump-tailwind-4.3

Conversation

@benface

@benface benface commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor

Problem

The Tailwind snapshot vendored into dist/v4-*.mjs is pre-4.3.0, so it lacks the !arg.includes("(") guard that was added in tailwindlabs/tailwindcss#19989 (2026-05-08). Without that guard, --value(...) argument normalization appends a trailing -* to --default(1px), producing --default(1px)-*; the value validator then walks the parsed nodes and warns:

Unsupported bare value data type: "-*".
Only valid data types are: "number", "integer", "ratio", "percentage".

```css
--value([*],--default(1px)-*)
                          ^^

for every `@utility name-*` block whose declarations use `--default(...)`. Real Tailwind 4.3.x parses the same CSS without warnings; the bundled snapshot reproduces it because the guard isn't there.

I hit this via `oxfmt` (which vendors this plugin) on a project defining a functional utility with `--value([*], --default(1px))`, but the root cause is here.

### Reproduce

`utils.css`:

```css
@utility rule-inset-* {
  --mw-rule-inset: --value([*], --default(1px));
}

.prettierrc:

{ "plugins": ["prettier-plugin-tailwindcss"], "tailwindStylesheet": "./entry.css" }

with entry.css importing tailwindcss and utils.css. Then prettier --check (or any host running the sorter) emits N Unsupported bare value warnings.

Fix

Bump tailwindcss-v4: "npm:tailwindcss@^4.1.14" → "^4.3.0" so the rebuild picks up the guarded normalizer. Existing pin allowed 4.3.x semver-wise, but the lockfile stayed on 4.1.18 across insider builds — the specifier bump forces a floor.

Verification

Verified end-to-end:

  1. Built this plugin locally with the bump — new dist/v4-*.mjs contains c[0]==="-"&&c[1]==="-"&&!c.includes("(")&&!c.includes("-*")&&(c+="-*") (the guard) instead of the old f[0]==="-"&&f[1]==="-"&&!f.includes("-*")&&(f+="-*").
  2. Copied the rebuilt bundle over the vendored one in an oxfmt@0.65.0 install of a monorepo using --default(1px) in three functional utilities. oxfmt --check . went from 24 Unsupported bare value warnings to 0.

Both pnpm build and the existing test suite pass locally after the bump.

Related

  • Filed upstream against oxfmt (which vendors this plugin) — oxc-project/oxc#26187 — with the same root-cause analysis.

Edit by @RobinMalfait:
Fixes: #468
Fixes: #471

The vendored Tailwind snapshot that gets bundled into `dist/v4-*.mjs`
predates Tailwind 4.3.0, which is missing a guard in the `--value(...)`
argument preprocessor that was added by tailwindlabs/tailwindcss#19989
(2026-05-08): without the `!arg.includes("(")` check, `--default(1px)`
picks up a trailing `-*` during normalization (becoming
`--default(1px)-*`), and the value validator then warns
`Unsupported bare value data type: "-*"` for every `@utility name-*`
whose declarations use `--default(...)`.

Real Tailwind 4.3.x parses the same CSS without warnings; our bundle
only reproduces the bug because it snapshot older code.

Bumping the pin to `^4.3.0` refreshes the vendored code (`c[0]==="-"
&& c[1]==="-" && !c.includes("(") && !c.includes("-*") && (c+="-*")`),
verified end-to-end by rebuilding this plugin, dropping the rebuilt
`v4-*.mjs` into an oxfmt install (which vendors this package), and
confirming the "Unsupported bare value" warnings drop from N to 0 on a
project using `--value([*], --default(1px))`.
@snoozbuster

Copy link
Copy Markdown

Likely also fixes #471 (as well as the other issue referenced by that one)

@RobinMalfait

Copy link
Copy Markdown
Contributor

Thanks!

@RobinMalfait
RobinMalfait merged commit 19faf8b into tailwindlabs:main Sep 1, 2026
1 check passed
graphite-app Bot pushed a commit to oxc-project/oxc that referenced this pull request Sep 3, 2026
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.

Linting markdown fenced code blocks uses embedded tailwind library Doesn't work in Markdown files

3 participants