Skip to content

Ensure not-* does not remove :is(…) #16825

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 26, 2025
Merged

Ensure not-* does not remove :is(…) #16825

merged 1 commit into from
Feb 26, 2025

Conversation

philipp-spiess
Copy link
Member

@philipp-spiess philipp-spiess commented Feb 26, 2025

Resolves #16821

This PR removes a special case in the not-* variant compound that removed :is(…) if it was the only part of the inversed selector list. While in-theory this makes sense, :is(…) accepts a forgiving selector list where as :not(…) does not. See the last point here.

This is an issue specifically in combinations with variants that have selectors that are not supported by all browsers yet, for example :open.

It seems to be the most expected to simply keep the :is(…) here in any case.

Test plan

@philipp-spiess philipp-spiess marked this pull request as ready for review February 26, 2025 14:40
@philipp-spiess philipp-spiess requested a review from a team as a code owner February 26, 2025 14:40
Copy link
Member

@RobinMalfait RobinMalfait left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another option is to check whether this was used in another forgiving wrapper or not.

But I think that's an optimization that can be added later.

@philipp-spiess philipp-spiess merged commit e938c58 into main Feb 26, 2025
5 checks passed
@philipp-spiess philipp-spiess deleted the fix/not-open branch February 26, 2025 17:03
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.

not-open is generated but not applied
2 participants