CSS Variables and SASS mixins are each potent on their own. With some creativity, we can make them work together towards more flexible and robust solutions. CSS and SASS variables are very powerful on their own but when you use them in combination:

LOL, just kidding

But as our project grows, we tend to define as many variables as required. And with the current trend and requirements(like Dark Mode), people are preferring CSS variables more because of their dynamic nature (can be updated in Runtime). We even tend to define different variables for shadows and opacity requirements. The problem starts when you try rgba()


Problem Statement

  • Use any opacity variant of any of the brand colors without adding complexity.
  • Apply changes to any brand color by editing just one line of code.
  • Fully utilize the power of dynamic CSS Variables.

#css-function #css-variables #css #scss #colors

Magic of CSS + SASS variables
1.85 GEEK