Post

The most interesting thing about css-in-js is its critics. Most criticism of css-in-js is very shallow and essentially boils down to "that is not was I was taught". It usually comes with oversimplified statements and a touch of name calling.

Bruce Lawson@brucel.bsky.social

Brogrammers couldn't wrap their megabrains around not-a-real-language CSS, so decided to reinvent it and fight against the web platform for their own convenience. Who could possibly have predicted it would be crap for users, and would need expensive surgery to drain the festering pus?

That is not to say there aren't valid criticisms of css-in-js solutions. There definitely is. Performance is a key one. But that is a criticism of individual libraries, not the concept in general.

0 reposts2 likes

Linaria and others emit essentially Tailwind style utility CSS if you want them to - the design time difference is ergonomics (writing real inline CSS) and the output is plain HTML & utility CSS or they emit plain old classes - my preference since it can load, deploy and update incrementally 🙂