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

Downlevel :is #19

Closed
devongovett opened this issue Dec 27, 2021 · 0 comments · Fixed by #131
Closed

Downlevel :is #19

devongovett opened this issue Dec 27, 2021 · 0 comments · Fixed by #131
Labels
enhancement New feature or request

Comments

@devongovett
Copy link
Member

The :is selector is fairly new so we should probably downlevel it: https://caniuse.com/css-matches-pseudo. We use it currently to compile nesting as well.

In the general case, this is hard if not impossible to do correctly. It can easily explode in combinations and generate massive CSS, and in some cases might be challenging without knowing the DOM because it's essentially boolean logic (if this selector matches, AND this selector matches). But may work in simple cases. See also postcss/postcss-selector-matches#19 (comment) and https://github.com/csstools/postcss-is-pseudo-class.

Perhaps we could compile to the older :matches or :-webkit-any syntax at least.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant