Skip to content
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

:is() should behave like :matches() with @extend #2829

Closed
nex3 opened this issue Feb 28, 2020 · 3 comments · Fixed by #3027
Closed

:is() should behave like :matches() with @extend #2829

nex3 opened this issue Feb 28, 2020 · 3 comments · Fixed by #3027
Labels
CSS compatibility Support the CSS spec enhancement New feature or request planned We would like to add this feature at some point

Comments

@nex3
Copy link
Contributor

nex3 commented Feb 28, 2020

Currently, if a :matches() selector is extended into :not(), it's replaced with additional :not() rules. For example, selector-extend(":not(.c)", ".c", ":matches(.d, .e)") returns :not(.c):not(.d):not(.e). However, despite :matches() being an alias for :is(), the same is not true for the :is() selector. It should be.

@nex3 nex3 added enhancement New feature or request planned We would like to add this feature at some point labels Feb 28, 2020
@nex3 nex3 changed the title :not() should treat :is() like it treats :matches() with @extend Feb 28, 2020
@nex3
Copy link
Contributor Author

nex3 commented Feb 28, 2020

Actually, it looks like the problem is broader—we have a fair amount of :matches()-specific logic, and none of it is currently applied to :is().

@nex3 nex3 added CSS compatibility Support the CSS spec awaiting browser support Blocked on at least one browser implementing something labels Feb 28, 2020
@nex3
Copy link
Contributor Author

nex3 commented Feb 28, 2020

Note that :is() is not yet supported by that name in any browsers.

@stof
Copy link
Contributor

stof commented Jan 4, 2021

:is() is now supported in Firefox and Safari (and Chromium has it behind a flag)

@nex3 nex3 removed the awaiting browser support Blocked on at least one browser implementing something label Jan 5, 2021
nex3 added a commit that referenced this issue Feb 19, 2021
This lays down some specs which can then be updated for #2829.
nex3 added a commit that referenced this issue Feb 24, 2021
This lays down some specs which can then be updated for #2829.
nex3 added a commit that referenced this issue Mar 18, 2021
nex3 added a commit that referenced this issue May 24, 2021
mirisuzanne pushed a commit that referenced this issue Feb 10, 2022
This lays down some specs which can then be updated for #2829.
mirisuzanne pushed a commit that referenced this issue Feb 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CSS compatibility Support the CSS spec enhancement New feature or request planned We would like to add this feature at some point
2 participants