CSS Custom Properties have many interesting uses beyond serving as a simple storage and retrieval mechanism for CSS values. In this article, we will explore the best practices around using them as a bridge between CSS and JavaScript. Keeping CSS and JavaScript isolated with CSS classes Most of the time, you want to maintain a good level of isolation between CSS and JavaScript, in order to separate