Why I Stopped Using CSS-in-JS (And What I Use Instead)
After years of styled-components and Emotion, I switched to Tailwind CSS. Here's the real reason — and it's not what you think.
I was a CSS-in-JS evangelist for three years. Styled-components in every project, theme providers everywhere, runtime style injection that I swore was "fine for performance." Then I started measuring. And the numbers didn't lie.
The best CSS architecture is the one your whole team can read, write, and maintain without a decoder ring.
The runtime overhead was real — 12-18KB of JavaScript just to parse styles, plus the flash of unstyled content on slower connections. But honestly? That wasn't the dealbreaker. The dealbreaker was onboarding. Every new dev needed to learn our abstraction layer before they could center a div. Tailwind gave us a shared vocabulary that junior devs and seniors could both use on day one.