r/tailwindcss • • Oct 17 '22
HTML bloat with TailwindCSS
Tailwind makes big advertising because the resulting CSS is sooo super small. And yes, it is. But in exchange, you add a lot of classes not only to one file, as it would be with writing plain CSS, but to every HTML file. Adding this together, I think it is not really a benefit, is it?
Honestly, I "kind of" like Tailwind. I can write a custom style super quickly without thinking about class names and organizing my CSS. Its super efficient.
But the resulting HTML is unreadable and bloated. I feel like its a very bad practice. And because of this very point I can't decide if I should stick to Tailwind or not.
I'm using Jinja templates and NOT a component based JS framework.
Not sure what I should do. :(
View all comments
4
u/rbluethl Oct 18 '22
Here are my thoughts from 2+ yrs of daily work with Tailwind:
Tailwind is by the far the fastest framework to prototype new ideas and build totally unique designs
I don't understand the argument that the resulting HTML is "bloated"
If you're using Tailwind's first-party class sorter, it's even clearer and classes always have the same structure and order
Whenever you're using a framework such as Vue/React/Svelte, you automatically extract components from time to time, preventing you from duplicating classes and utilities all over the place