You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.The text was updated successfully, but these errors were encountered: