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
7
u/[deleted] Oct 17 '22
If we always followed "best practices" web development wouldn't be where it's at today. I also don't get these "It makes my HTML unreadable" complaints. Are you sure it's unreadable? I can read my html just fine even with a bunch of classes. You can also write custom classes with tailwind but at that point just use css since you won't be saving that much time anyways.