CodyHouse Icon

CodyHouse

Web design nuggets ✨
codyhouse.co • 1 Story
All Sources

CodyHouse Icon CodyHouse

Benefits of CSS custom properties over Sass variables

While they may have been inspired by Sass variables, CSS custom properties are a whole other level of powerful, enabling some elegant new patterns in UI development. Just ask Sebastiano Guerriero:

Are they the same? Not really! Unlike SASS variables, custom properties 1) are scoped to the element they are declared on, 2) cascade and 3) can be manipulated in JavaScript. These three features open a whole new world of possibilities. Let me show you some practical examples!

Player art
  0:00 / 0:00