CSS
April 10, 2025
Custom properties have completely changed how we write CSS, but most people don’t take full advantage of what we can do with them. In this video, we go beyond simply setting them up in the :root, exploring the benefits of locally scoped custom properties, as well as setting up undeclared custom properties using fallbacks, as well as some of the benefits of registering custom properties.
🔗 Links
MDN @property syntax:
https://developer.mozilla.org/en-US/docs/Web/CSS/@property/syntax
CodePen for no inheritance:
https://codepen.io/kevinpowell/pen/WNqyPgR
CodePen for first example:
https://codepen.io/kevinpowell/pen/ZYEjLOm