Live data from Hacker News

I don't recommend Tailwind CSS

en.andros.dev

141–150 of 179 posts

Re: I don't recommend Tailwind CSS

#141

Earlier quoted context omitted.

I feel like scoped css and component libraries fixed this issue. I don’t have a .button, I just have a that has all its css self contained. And just a shared color definition file.

Same, my need for tailwind got completely ridden when I started using Svelte, thanks to the CSS-scoping it entailed.

That's funny, Vue had this like a decade ago. It was nice but I switched to React instead due to library support.

Re: I don't recommend Tailwind CSS

#143
post #70
post #6

My sass customers don't even know what css means, it's fine. Nobody cares as long as the things they expect are on the page in the right position and font is readable.

Do your sass customers know what javascript is or how it's different from java? Does this mean developers shouldn't care either?

They don’t, unfortunately. Any time I bring up the wonders of Elixir/Erlang or how great Postgres is, their eyes glaze over unless they have some kind of technical background. I’ve had many conversations where people were surprised there’s more than one programming language, they assume it’s some sort of 1s and 0s that flash past the screen Hollywood style.

Re: I don't recommend Tailwind CSS

#144
post #69

Earlier quoted context omitted.

You just make a design system in your tailwind.css, following the documentation. You can optionally use something like daisyui if you do not have designer skills or the time. That handles consistent sizing, spacing, text, colors, dark mode, and anything else your design system needs. It all compiles down to css in the end, so no runtime overhead and gives you the superior tailwind dx during development.

Congratulations, you reinvented regular CSS.

If that is so, why are people getting up in arms about tailwind?

Re: I don't recommend Tailwind CSS

#145
I also don't recommend TailwindCSS.

I instead recommend using HTML + CSS in a way that scales. Plus using a framework that supports scoped components helps.

I'm writing a web developer guide on using HTML + CSS and JS only when you need it: https://webdev.bryanhogan.com/

I'm also using the described approach in building a Astro starter template: https://starter.bryanhogan.com/

Re: I don't recommend Tailwind CSS

#146

I've seen one of these posts every 6 months for the last 5 years and not a single one has figured out components yet.

What exactly is there to figure out or what would you like them to figure out?

Using them perhaps? Complaining about separation of concerns never makes any sense when you use components because the components are the structure and the styles are tightly coupled. You could separate the styles, almost all of them are going to be specific to the component so there's not much of a point unless you really like writing one-off class names.

Re: I don't recommend Tailwind CSS

#147
post #144

Earlier quoted context omitted.

Congratulations, you reinvented regular CSS.

If that is so, why are people getting up in arms about tailwind?

If it's just CSS then why would I use Tailwind instead of the actual thing? It's a layer of indirection for no reason if it's the same.

Re: I don't recommend Tailwind CSS

#148
post #144

Earlier quoted context omitted.

If that is so, why are people getting up in arms about tailwind?

If it's just CSS then why would I use Tailwind instead of the actual thing? It's a layer of indirection for no reason if it's the same.

If BEM is regular CSS, why would I use BEM instead of the actual thing? It's a layer of indirection for no reason if it's the same.

You use Tailwind in the same way you use BEM: becuase it makes it easier for frontend developers to write correct CSS.

Re: I don't recommend Tailwind CSS

#149
post #10

This is such a bikeshedding debate. While you don't recommend it, projects with Tailwind work . Over years. You can onboard new developers to it, able to contribute productively immediately . Likewise, you can pick up work after months or years and don't have to remember or rediscover how your styling layer works. The conventions and class names come really naturally fast, and you can always look it up. It's just not…

also note that `class="text-red-500 text-green-500"` gets flagged immediately by the Tailwind VS Code plugin

> 'text-green-500' applies the same CSS properties as 'text-red-500'. tailwindcss(cssConflict)

So even if you do it by accident, it will tell you.

Re: I don't recommend Tailwind CSS

#150
post #10

This is such a bikeshedding debate. While you don't recommend it, projects with Tailwind work . Over years. You can onboard new developers to it, able to contribute productively immediately . Likewise, you can pick up work after months or years and don't have to remember or rediscover how your styling layer works. The conventions and class names come really naturally fast, and you can always look it up. It's just not…

> You can onboard new developers to it, able to contribute productively immediately

Maybe it helps with people nee to Web development but as an existing CSS developer tailwind slows me down incredibly.

I know exactly what styling I wish to apply, I now have to translate it into another language to apply it.

And the browser inspector looks terrible because every element has a long bunch of utility classes added to it.

Post reply on HN