tailwindcss/packages
Robin Malfait 494051ca08
Consider variants starting with @- to be invalid (e.g. @-2xl:flex) (#18869)
This PR fixes a small parsing issue where variants such as `@-2xl:flex`
would parse, but were handled as-if they were `@2xl:flex` instead.

Noticed this while working on: #18867 

This is because when we parse normal variants like `data-foo` then we
want to have a `data` root and a `foo` value, not a `-foo` value.

If you are now using `@-2xl:flex`, then no CSS will be generated for
this anymore. If you were relying on this for some reason, you should
use `@2xl:flex` instead.

## Test plan

Before:

<img width="862" height="586" alt="image"
src="https://github.com/user-attachments/assets/b5993ca6-f907-49af-b5bd-b7206c8300e1"
/>

After:

<img width="862" height="586" alt="image"
src="https://github.com/user-attachments/assets/351f45e4-4cd3-451c-ae2a-c52c3e770629"
/>

---------

Co-authored-by: Jordan Pittman <thecrypticace@gmail.com>
2025-09-03 14:07:32 +00:00
..
@tailwindcss-browser Drop warning from browser build (#18732) 2025-08-14 12:20:19 -04:00
@tailwindcss-cli Prepare v4.1.12 release (#18728) 2025-08-14 14:35:49 +02:00
@tailwindcss-node Update magic-string 0.30.17 → 0.30.18 (minor) (#18821) 2025-08-29 14:22:19 +00:00
@tailwindcss-postcss Prepare v4.1.12 release (#18728) 2025-08-14 14:35:49 +02:00
@tailwindcss-standalone Prepare v4.1.12 release (#18728) 2025-08-14 14:35:49 +02:00
@tailwindcss-upgrade Fix missing code block delimiters in comment blocks (#18837) 2025-09-01 09:36:43 +00:00
@tailwindcss-vite Prepare v4.1.12 release (#18728) 2025-08-14 14:35:49 +02:00
internal-example-plugin Prefix internal modules with internal-* (#14074) 2024-07-29 10:58:07 -04:00
tailwindcss Consider variants starting with @- to be invalid (e.g. @-2xl:flex) (#18869) 2025-09-03 14:07:32 +00:00
tsconfig.base.json Improve debug logs (#15303) 2024-12-11 15:27:20 +01:00