google / postcss-rename

Replace class names based on a customizable renaming scheme.
Apache License 2.0
122 stars 18 forks source link

css variables renaming #56

Open theseanl opened 2 years ago

theseanl commented 2 years ago

I've always wished Closure Stylesheets would have such a feature – it could rename css variables and emit it in a call goog.setCssNameMapping just like other class names, so that one can modify its value in JS via something like element.style.setProperty(goog.getCssName("--my-variable"), "#fff"). Would such a feature be in the scope of this project?

nex3 commented 2 years ago

In principle I could see this supporting something like that

RodrigoTomeES commented 1 year ago

hi!, @nex3 any update about this? Thanks

MrHBS commented 9 months ago

I would like to see this as well. Thanks!

shivamkj commented 7 months ago

Till this plugin adds support for css variable, we can use postcss-variable-compress - npm plugin. I used it with Astro, seems to be working fine.