JPeer264 / node-rename-css-selectors

📝 Rename css classes and id's in files
MIT License
66 stars 9 forks source link

Rename CSS Custom Properties (Variables) #37

Closed klimashkin closed 5 years ago

klimashkin commented 5 years ago

Hi! We are dropping IE11 support in our company, so finally we start leveraging CSS Variables natively 🎉 But as classnames they might become pretty wordy, so it would be nice to have an option to mangle them too along with classnames and animation names!

JPeer264 commented 5 years ago

Hey happy to hear that you are dropping IE11 :) My company is still using it for a while unfortunately. But yeah I agree, CSS Variables support sounds like a good idea. I will investigate in it ;)

JPeer264 commented 5 years ago

@klimashkin works in v3.2.1 💪

EDIT: Seems like something went wrong with my rcs-core build ;) - 3.2.1 it is

klimashkin commented 5 years ago

Awesome! Is it possible also to have a flag for that, similar to replaceKeyframes? Not always it's needed to be mangled : )

JPeer264 commented 5 years ago

Ah whoops seems like that's the only option I forgot to put in the docs 😅 And it seems I have a kind of inconsistency in here, as my option is ignoreCssVariables, so by default it is set to false. I will rename replaceKeyframes in the next major release to ignoreKeyframes and will also set it to false so I have some consitent options if that's ok for you ;)

klimashkin commented 5 years ago

Yes, that works, thanks!