Live data from Hacker News

CSS's problems are Tailwind's problems

colton.dev

151–160 of 179 posts

Re: CSS's problems are Tailwind's problems

#151
post #46

Can't agree that Tailwind is popular because it forces you to setup a centralized config file (although I guess that is nice). It's because, as ugly as a long line of inline classes can be, it's easy to know exactly what styles are being applied to an element. Especially when there are more than 1 or 2 devs writing styles.

... do people not know about browser developer tools? Unless a project has really messed up, it is trivial to see what styles are being applied to any element.

Ah yes, so much easier to poke through the styles in the dev tools than to just put your eyeballs on the css class in the file.

Re: CSS's problems are Tailwind's problems

#152
post #63
post #18

I can't believe this article made it to the front page. It feels like the author has some personal vendetta and just doesn't care about the facts. > Tailwind decided to burst on to the scene and become the default styling solution for all modern web development despite taking each and every one of these problems, exacerbating them, and applying them to places that didn't have them before If Tailwind is so bad and has…

> If Tailwind is so bad and has literally no upsides then how on earth it managed to take the frontend world like a storm? In authors eyes frontend developers have to be either stupid, or ignorant, or both if they decided to choose such a bad solution en masse. Please read the entire article before commenting. I have an entire section on this. I don't think frontend devs are idiots and never said they were. Tailwind…

If frontend devs aren't just idiots, why haven't they figured out it offers no benefits? You've reduced it down to "it forces you to set shit up", which I don't think literally any proponent of Tailwinds would agree with.

Re: CSS's problems are Tailwind's problems

#153
post #76

Earlier quoted context omitted.

This isn't something a web developer should be doing in 2025. The styling should be generated by the software used to design the UI. Why aren't the companies building design tools solving this?

Adobe has been trying to build this product for 30 years and still haven't figured it out. Figma is trying and the best you can get is partially usable copy and paste CSS. This is a "why don't they just make self-driving cars" question. The answer is that there are too many edge cases.

I don’t think building autonomous cars is on the same level as writing CSS.

We're entering a phase where natural language becomes the main interface for html and css development. Companies like Vercel, Wix, and Framer are integrating AI to turn design prompts into working UI components.

This is only the beginning. Within 2 to 3 years, domain-specific language models, trained specifically on frontend code, are expected to become common.

Regarding Adobe, they never really understood developers.

Re: CSS's problems are Tailwind's problems

#154
post #38

Been using Tailwind since starting my job 5 years ago where we have a ton of webapps standardized on Angular+Tailwind, and you may have to hop into a webapp you've never heard of before to fix a bug. Couldn't be happier with how much easier it is to build and maintain compared to traditional CSS. Many many words I've read trying to convince me why I shouldn't be having a good time using it, yet here I am more product…

You'd also be more productive and have less unknowns and potentially less decision paralysis if, say, everyone started using excel hooked up to a database instead of writing their own bespoke CRUD app, but alas, those aren't the reasons one asks programmers to program.

Re: CSS's problems are Tailwind's problems

#155
post #146
post #45

Earlier quoted context omitted.

My point is that there is no one CSS library to rule them all and likely never will be. The closest to that is going back to pure raw CSS which I highly doubt people will do. And yes while it's obviously not ideal to have a hundred competing libraries in your code, you can create what works for you / your team.

> The closest to that is going back to pure raw CSS which I highly doubt people will do. Huh? Tons of people write vanilla CSS which is getting better every year.

Very very few people, in practice, write vanilla CSS. They use libraries and frameworks often, like Bootstrap. Sure, that might be "vanilla CSS", but you didn't write it, presumably because you didn't want to.

Look, after a certain point we have to call a spade a spade and acknowledge that CSS is just too cumbersome, too awkward, and too complicated for most developers and companies. How much CSS do you see that seems to be read-only? People just... tack on to the end of the style sheet, right?

The promise of re-usability is great, but is it actually happening? IME, no.

Re: CSS's problems are Tailwind's problems

#156

I'm surprised that the official Tailwind docs recommend putting the `font-medium` class (i.e. `font-weight: medium` in CSS) on every child element of that and using multi-cursor editing to change them all simultaneously. `font-weight` is inherited, meaning that they could just add it once to the element. I dislike Tailwind and don't use it, but I wonder how many papercuts like this come down to just not knowing CSS v…

I use tailwind because I'm fed up with inheritance.

Re: CSS's problems are Tailwind's problems

#157
Breaking things into components eliminates the repetition AND eliminates separate CSS.

Using Tailwind without components is the worst of all the worlds. You could do it though, just start off your journey a CSS file like this:

    ```
    .btn-confirm {
      @apply min-w-[200px] block bg-green; // plus many more, probably
    }
    ```
But that sucks because now you have a separate CSS file outside your component. Where will you put it in your codebase? Will it grow other random styles over time? You’re asking for a mess.

Better to do:

    ```
    export default const ConfirmButton = ({ children }) => {children}
    ```
Now use a `` everywhere and avoid all that repetition.

Re: CSS's problems are Tailwind's problems

#158
post #12

Earlier quoted context omitted.

I can't believe people find even half of this acceptable, do they never use a browser inspector in their work?

I do, and it’s great having the styles right there and hackable.

No matter what you are using, they are always there, editable/hackable.

However I would argue that it makes it slightly harder to make any change. You no longer have a single class with all the styles that are affecting that element.

You can change the classes in the harder to read html, or override the single element. There is no longer the possibility to, for example, affect all .primary-btns.

Re: CSS's problems are Tailwind's problems

#159
post #153

Earlier quoted context omitted.

Adobe has been trying to build this product for 30 years and still haven't figured it out. Figma is trying and the best you can get is partially usable copy and paste CSS. This is a "why don't they just make self-driving cars" question. The answer is that there are too many edge cases.

I don’t think building autonomous cars is on the same level as writing CSS. We're entering a phase where natural language becomes the main interface for html and css development. Companies like Vercel, Wix, and Framer are integrating AI to turn design prompts into working UI components. This is only the beginning. Within 2 to 3 years, domain-specific language models, trained specifically on frontend code, are expecte…

I'll believe it when I see it, and so far what I'm seeing is "a llm lied to me and deleted my codebase"

Re: CSS's problems are Tailwind's problems

#160
Some real issues with Tailwind I don't see mentioned as often is they should revolve around the lack of some modern and efficient CSS features and techniques and the inefficient, outdated habits it tends to promote as a result.

Over-reliance on media queries and the absence of the clamp() function are just two obvious examples among many others.

Performance and browser devtool usability also suffer under Tailwind (compared to good CSS). Since I wouldn't want to waste time on a “dead” thread, I'll stop here. But if anyone is curious and wants me to elaborate, it'll be a pleasure to do so.

Post reply on HN