tailwindcss/packages
Robin Malfait 707c23b955
Ensure custom variants can be used via @variant in addBase (#20247)
This PR fixes an issue where `@variant` inside `addBase` is being used
with a custom variant.

The issue is that we substitute the `@variant` calls immediately when we
call the `addBase` function. That means that variants that aren't
processed yet will error out.

This is a regression, because this used to work in Tailwind CSS v4.3.0
and started failing in Tailwind CSS v4.3.1.

## Test plan

1. Added a regression test
2026-06-16 23:05:50 +02:00
..
@tailwindcss-browser 4.3.1 (#20226) 2026-06-12 19:33:35 +02:00
@tailwindcss-cli Ensure @tailwindcss/cli watches the input file (#20246) 2026-06-16 18:38:29 +02:00
@tailwindcss-node Fix crash when using @tailwindcss/vite using deno v2.8.x (#20245) 2026-06-16 16:03:27 +02:00
@tailwindcss-postcss 4.3.1 (#20226) 2026-06-12 19:33:35 +02:00
@tailwindcss-standalone Update all pnpm dependencies (2026-06-15) (#20241) 2026-06-15 13:13:32 +00:00
@tailwindcss-upgrade 4.3.1 (#20226) 2026-06-12 19:33:35 +02:00
@tailwindcss-vite 4.3.1 (#20226) 2026-06-12 19:33:35 +02:00
@tailwindcss-webpack 4.3.1 (#20226) 2026-06-12 19:33:35 +02:00
internal-example-plugin Prefix internal modules with internal-* (#14074) 2024-07-29 10:58:07 -04:00
tailwindcss Ensure custom variants can be used via @variant in addBase (#20247) 2026-06-16 23:05:50 +02:00
tsconfig.base.json Improve debug logs (#15303) 2024-12-11 15:27:20 +01:00