Skip to content

Conversation

@RobinMalfait
Copy link
Member

This PR fixes an issue where an empty selector list was valid when defining a @custom-variant.

Given this input:

@custom-variant foo ();

If you then use it with a utility such as foo:flex, then the following (incorrect) CSS was generated:

.foo\:flex {
   {
    display: flex;
  }
}

Which is invalid CSS. This PR will now validate that that we have at least something and show an error accordingly.

@RobinMalfait RobinMalfait requested a review from a team as a code owner January 29, 2025 14:53
@RobinMalfait RobinMalfait merged commit 924dd69 into main Jan 29, 2025
5 checks passed
@RobinMalfait RobinMalfait deleted the fix/validate-empty-custom-variant branch January 29, 2025 15:09
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.

3 participants