Skip to content

custom properties :root class support #1612

Closed as not planned
Closed as not planned
@movie4

Description

@movie4

What would you want to propose?

Hello! We encountered the fact that the type construction is not supported

:root.ClassName {
    --custom-props: value
}

Suggested solution

In source code we found that the package does not process the class of the :root element no

https://github.com/csstools/postcss-plugins/blob/main/plugins/postcss-custom-properties/src/get-custom-properties-from-root.ts

export const ROOT_SELECTOR_REGEX = /^:root$/i;

```need to modify the regular expression to support the className``

Additional context

No response

Validations

  • Follow our Code of Conduct
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

Would you like to open a PR for this feature?

  • I'm willing to open a PR

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions