CSS Variables are absolutely great and much better than the variables functionality of preprocessors like SASS!
That's because a great benefit of CSS variables is that they can be manipulated from JavaScript.
Also, they make the responsive design much easier, as changing the variable on a breakpoint is enough to apply the color change, instead of changing all the instances where it is being used.
CSS Variables are absolutely great and much better than the variables functionality of preprocessors like SASS!
That's because a great benefit of CSS variables is that they can be manipulated from JavaScript.
Also, they make the responsive design much easier, as changing the variable on a breakpoint is enough to apply the color change, instead of changing all the instances where it is being used.
As an example, here's a pen I've made some time ago, using those two features: codepen.io/gsarig/pen/xxVzzmY
Thank you for extra info + sharing pen 🙏🌹