Skip to content

Downlevel :is #19

@devongovett

Description

@devongovett

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions