Skip to content

Plugin for light-dark() #1143

@TKDev7

Description

@TKDev7

What would you want to propose?

A PostCSS plugin for light-dark() function added in css-color-5

Suggested solution

:root {
  —foo: light-dark(bar, baz);
}

becomes:

:root {
  —foo: bar;
}

@media (prefers-color-scheme: dark) {
  :root {
    —foo: baz;
  }
}

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

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions