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

Added a feature to preserve or not the original code #34

Closed aletorrado closed 6 months ago

aletorrado commented 6 months ago

Hi, I added a preserve parameter that defaults to true, consistent with how other common postcss plugins handles this matter (more on this here).

Thanks!

ai commented 6 months ago

Let's use a different name for parameter. classOnly or something like this, to highlight that it is another mode.

aletorrado commented 6 months ago

Sure. I used onlySelectors as not just classes may be used, but any other selector would work.

ai commented 6 months ago

You need to add more tests to keep 100% lines coverage.

And let’s name option as removeMedia.

aletorrado commented 6 months ago

Sure. I've just added those.

ai commented 6 months ago

Thanks. Released in 1.3.0.