CSS Variables in JS: why and how?
Lorem ipsum dolor sit amet
The saying goes that “good artists copy, great artists steal” — if that’s true, then I’m the Pablo fucking Picasso of frontend webdev.
I’m always thrilled when I find a great open-source frontend library like Radix UI. In particular, they have a library full of so-called headless components which come unstyled and “opened” out of the box. They’re made for you to take apart and put back together, and I think that’s a delightful vision for both software in general and frontend webdev in particular.
When we recently started building out our first take on an internal design system at Ditto, I was optimistic about Radix’s Primitives for a number of reasons. The biggest surprise, however, was Radix’s phenomenal usage of CSS Variables to make it easy to customize their components out of the box.