Skip to content

Conversation

RobinMalfait
Copy link
Member

@RobinMalfait RobinMalfait commented Sep 3, 2025

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:

image

After:

image

RobinMalfait and others added 2 commits September 3, 2025 15:53
Co-Authored-By: Jordan Pittman <[email protected]>
Co-Authored-By: Jordan Pittman <[email protected]>
@RobinMalfait RobinMalfait requested a review from a team as a code owner September 3, 2025 13:56
@RobinMalfait RobinMalfait changed the title Fix incorrectly parsing @-… variants Consider variants starting with @- to be invalid (e.g. @-2xl:flex) Sep 3, 2025
@RobinMalfait RobinMalfait enabled auto-merge (squash) September 3, 2025 14:04
@RobinMalfait RobinMalfait merged commit 494051c into main Sep 3, 2025
7 checks passed
@RobinMalfait RobinMalfait deleted the fix/disallow-at-dash-variants branch September 3, 2025 14:07
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