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 <thecrypticace@gmail.com>
Co-Authored-By: Jordan Pittman <thecrypticace@gmail.com>
@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
@mariansimecek
Copy link

@RobinMalfait
Hi, this change breaks some styles on our website. I found out that the old migration script automatically generated @-4xl (the current version doesn’t do that). It took me some time to find the root cause of the issue. I just wanted to let you know that there may be people who used the migration script, and now their websites will break. You may want to consider marking this change as breaking.

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.

4 participants