CSS Custom Properties as a Context Alternative
Passing color data between components doesn't require a dedicated library. Custom properties are built into CSS, and using them can leave developer experience intact while giving users a faster experience. Kent demonstrates the approach with demos.
The piece argues you can go further than Kent's demo and skip CSS-in-JS entirely, while still updating CSS custom properties from button clicks in React and managing the state there. The reasoning: one of the core jobs of a UI component library like React is managing state, and CSS could stand to know about that state so it can drive any styling you need.
Kent, on the other hand, offers this:
I've never been so productive working with CSS than when I added a real programming language to it.
The response to that claim is an extreme side eye. The article also suggests the practice be renamed CSS-in-React, since React is the only major framework without a blessed styling solution.



