Skip to content
This repository was archived by the owner on Jun 6, 2022. It is now read-only.
This repository was archived by the owner on Jun 6, 2022. It is now read-only.

Use the postcss-selector-matches #16

Closed
@yisibl

Description

@yisibl

In order to support more complex cases, We can use the postcss-selector-matches to transform.

@MoOx Do you feel that you are directly dependent on another plugin?

/* input: */
@custom-selector :--any-link :link, :visited;
@custom-selector :--heading h1, h2, h3;

:--heading > a:--any-link {
  color: red;
}

/* Then use the postcss-selector-matches to transform: */
:matches(h1, h2, h3) > a:matches(:link, :visitedk) {
  color: red;
}

/* output: */
h1 > a:link, h2 > a:link, h3 > a:link, h1 > a:visited, h2 > a:visited, h3 > a:visited {
  color: red;
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions