One of the interesting and under-explored avenues CSS-in-JS opens up is the ability to experiment with wholly new styling constructs, rather than simply transferring ideas & techniques from CSS to a new ecosystem.
I’ve been tinkering with the idea of “traits” – a kind of “subatomic” styling – for several years, but never really shared it beyond colleagues. I’ve experimented with versions of it in Sass, CSS modules, Styled Components & React Native, and while the implementations are all a little different, the concept seems to be working well.
I’ll be talking about the concept, how it’s evolved, how it relates to popular CSS-native techniques like Tachyons/Tailwind, and how you can try it out yourself!