top | item 46570006

(no title)

aleksandrm | 1 month ago

What were the benefits that you felt instantly? I still don't feel anything and would prefer plain CSS over Tailwind any day.

discuss

order

ForHackernews|1 month ago

It lets you apply styles to a single element without it messing up the whole rest of the page/site/app. i.e. it disabled the primary feature of CSS, the thing most people don't want from it.

peacebeard|1 month ago

I agree that the primary feature of CSS is what people don't want from it anymore. If you're building your app with components (web components, react, etc), those become the unit of reuse. You don't need CSS to offer an additional unit of reuse, it only complicates things at that point.

azangru|1 month ago

Why do people prefer it over CSS modules? They also solve the style containment problem, and do not require any effort to set up, or any additional library to learn?

cluckindan|1 month ago

Which means most people don’t understand the basics of what they’re working on.

jasonkester|1 month ago

I think that’s what people are talking about when they say they don’t see the benefit.

There’s already a style attribute on every html element that does exactly that, and works fine in components.

“There must be something more…?” But it turns out there’s not. Just shorthand class names to save you having to type padding-left:4px

aleksandrm|1 month ago

I can already do the same with plain CSS. How is this better?

Tade0|1 month ago

How is that different than inline styles?

jackhuman|1 month ago

I first took a css courses to get the basics then didn’t do much with it, then tailwind came out. I had used bootstrap, but always struggled to get stuff to look nice. I’m not doing web dev most of the time. So it was much easier to memorize tailwind utility classes than css. These days with ui frameworks like daisy, shadcn, tailwind is pretty easy for doing something simple for an IT dev tool but still customize it.

For creativity, I wished I had the time to get really good with css. It really seems to have grown a lot. Using sveltekit, its really easy to get component scoped css

watwut|1 month ago

Honestly, for me, tailwind was just pleasant to work with and pure css definitely was not.

And I was super skeptical about it at first. I almost said no to it, but I trusted our main ui guy and wanted to allow him autonomy. And I ended up loving tailwind after working with it.