Great post! To me, the type-safety drawback is not as significant as the "relying on strings that don't autocomplete and are not compile-time checked" drawback. But that's not a drawback of CSS variables per se, it's a drawback of CSS in general (class names and IDs suffer from the same problem).
The combination of CSS variables and media queries is so powerful. I share another example in this blog post: www.joshwcomeau.com/css/css-vari...
0 reposts0 likes