www.builder.io
The Tailwind CSS Drama Your Users Don't Care About
Excerpt
Cons: - Mixes the ol’ separation of concerns — styles with markup. - It bloats HTML markup and looks like inline styles === ugly. Tip: if what bothers you in Tailwind is the “ugliness” inside your HTML, you can use the Inline Fold VScode extension. ### Verbosity CSS is very verbose, meaning you need to write a lot of characters to define each property. Also, there are things that might need a few properties to achieve something relatively simple. When you write pure CSS, you write a lot of code. Pros: - Everything in Tailwind is just CSS. ... - Writing with Tailwind results in less code. ... - One Tailwind site/app can look completely different than another. - Easy to refactor. Cons: - You need to wire up custom CSS that might not be mapped to a TW utility class. - Tailwind is a non-standard way to use CSS. ### Zombie styles Unused CSS can bloat up your website or app. There’s nothing to stop you from writing the same style properties in different classes or selectors. Styles that aren’t used are still shipped to the browser but have no effect, they just hang around your codebase like zombies 🧟♂️. Pros: - Tailwind purges any styles (and zombies) that aren’t used. … “One issue for me with Tailwind-like solutions is that they 'confuse' Utility-Classes with Design Tokens, and unnecessarily bind them together. Design Tokens are great, we should absolutely use them, and it's very(!) easy to do with CSS custom properties. Utility Classes are also great, and we should use them too - for utility purposes. Mapping tokens to classes goes against every basic CSS principle and is quite redundant once you're working with a good set of tokens and a few basic useful utility classes.”
Related Pain Points
Misleading bundle size metrics and increased HTML payload
5While Tailwind markets tiny CSS bundles (<10kb), the actual HTML files grow 2-3x larger due to numerous utility classes per element. One project saw CSS shrink 45kb→8kb but HTML grow 120kb→340kb, resulting in a net 183kb increase, contrary to marketing claims.
Custom CSS implementation in Tailwind projects negates framework benefits
5Complex projects require custom CSS alongside Tailwind utilities and @apply overrides, creating a hybrid CSS architecture. This defeats the purpose of using Tailwind and introduces maintenance complexity from multiple paradigms coexisting.
Design inconsistency without strict adherence to design systems
4The flexibility of Tailwind can lead to inconsistent designs across projects if developers aren't mindful about following design systems or reusing components. One Tailwind site can look completely different from another.
Unused CSS (zombie styles) remain in codebase despite purging
3Even though Tailwind purges unused utilities, nothing prevents developers from writing duplicate style properties in different classes or selectors, leaving unused styles in the codebase that get shipped to browsers with no effect.
Confusion between utility classes and design tokens creates redundancy
3Tailwind conflates utility classes with design tokens and binds them together unnecessarily, going against CSS principles and creating redundancy that could be achieved through CSS custom properties alone.
Separation of concerns violated by mixing styles with markup
3Tailwind mixes CSS styling concerns directly into HTML markup, violating traditional separation of concerns principles and resulting in code that looks like inline styles, which many developers find aesthetically unpleasant.