postcss / postcss-dark-theme-class

PostCSS plugin to make dark/light theme switcher by copying styles from media query to special class
MIT License
160 stars 16 forks source link

Add `light-dark()` support #25

Closed ai closed 8 months ago

ai commented 8 months ago

https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/light-dark

a {
  color: light-dark(black, white);
}
:where(html.is-dark) a {
  color: black;
}
:where(html.is-dark) a {
  color: white;
}