Live data from Hacker News

Why Tailwind CSS Won

matt-rickard.com

451–460 of 559 posts

Re: Why Tailwind CSS Won

#451
post #372

Earlier quoted context omitted.

Do you know how Tailwind works? What you say is generally true, but I don't really see how it applies to TW...

No of course I don't. And due to javascript's reputation, I assumed. Because what I said IS generally true for the js bubble. The sad part is i don't even feel guilty for assuming, because this area of programming has a well deserved reputation. Even if this thing doesn't use javascript, can you guarantee the generated CSS doesn't put the browser's layout engine in an infinite loop or something? Especially without kn…

>Am I more clear now?

Nope

Re: Why Tailwind CSS Won

#452

Earlier quoted context omitted.

Assuming you work with a build system that can generate source maps...

This is easy and should not be a problem. It also is the kind of help/solution that should be implemented first, before any librairies or frameworks are added.

Have you worked on a FE team with 5 or more people?

There's a lot that is easy and shouldn't be a problem when you get to define the scope and technologies and shared conventions used.

Re: Why Tailwind CSS Won

#453
post #419
post #387

Earlier quoted context omitted.

Because you moved the goalposts. First you said that it “almost never” happens, then that it “won't actually happen”.

They never said that. I did. You're talking to different people.

Oh, sorry. I'm not looking at usernames.

Re: Why Tailwind CSS Won

#454

Earlier quoted context omitted.

If the options are "never encounter a problem" versus "when I encounter a problem I realize that it's actually a superficial symptom of a more substantial problem someone made hours/days/weeks/months ago," I will take the former 100% of the time.

Assigning an ID to every single element means never encountering a problem? I imagine that results in everything being a special case, much of the point of CSS missed, and in this special case Tailwind might even work as it's consistent with everything being a mess.

Well it certainly means never encountering odd and complex style cascades, but Tailwind avoids that problem altogether without requiring IDs for everything.

Re: Why Tailwind CSS Won

#455

Earlier quoted context omitted.

What makes you think tailwind would be hell in the future though? It's just a load of classes on html elements. Maintenance is pretty easy. I do agree with you on the headline though, of course tailwind hasn't won anything!

First, the site uses some weasel language to speak about how much they're "focused on performance" in such a way as you think Tailwind is literally faster than doing normal CSS. It's not. It's a heavy approach and while you can always find edge cases to the contrary, in general it leads to pages that add lag and load to people's devices. If you have a very simple page this doesn't matter, but as your site/business gr…

I would donate more upvotes to this multi-part tirade if I could.

I haven't used Tailwind, or any other CSS framework, because I have never understood why I would want to, having attended a talk about a similar system back in the day where styles were turned into weirdly specific CSS classes, as if they were trying to reinvent font tags. The way you've described it is pretty much what I would expect from such a thing.

And yet it's oddly familiar, because all of the 'MVC' frameworks that I've been forced to use and hated[1] seemed to come from the same design philosophy: Throw a bunch of shit code together, then build a cult around it so that people use it whether it makes any sense or not. Laravel's a great example of this because if you search the web for it you'll mostly get results saying that it's "elegant" and "for web artisans", but none of them can explain why it's better than...not using it. They even have some class in there called "Illuminate", which is ironically not very illuminating w.r.t. what the heck it is or does. As if writing code that actually makes any damn sense is everyone's biggest fear and the solution is to acquire a magic wand from one of the Framework Gods that does away with pesky old logic and predictability.

"What do you want to do, write everything from scratch?", your coworkers will say, as if we were making computer programs by banging rocks together before Laravel/Rails/Spring/Django/etc came along, and give you a blank stare if you try to explain that writing regular old well-factored OO/functional code is a thing you can do and that slathering culty frameworky paste all over everything doesn't make life any better or your programs any faster, even if said goo has "good documentation", by which they mean lots of activity on Stack Overflow because nobody can figure out how they're supposed to do anything without copy-pasting from some example that mysteriously worked for somebody one time.

[1] I don't remember much about the ones I didn't hate, because they did very little and stayed out of the way.

Re: Why Tailwind CSS Won

#456

Earlier quoted context omitted.

+1. Let's say things how they are: Tailwind is a small catastrophe from an implementation, performance and maintenance point of views. It got few things quite well in being a more modern bootstrap, had a stellar marketing and it's color palettes are really well done and leagues above the default material ones. ...that being said... Tailwind's biggest pro is that it allows people that _don't_ know css that much to sty…

>> Tailwind's biggest pro is that it allows people that _don't_ know css that much to style stuff more consistently and easily. But that's where it ends. I'm considering advocating for a move to TW at work. Most of the devs _don't_ know CSS well enough to style stuff consistently and easily. We have very complicated cascades, and sibling style imports, and "semantic" class names. Sure, maybe the answer is "level up y…

Yeah it sounds like one of the cases where using tw could be good.

Re: Why Tailwind CSS Won

#457

Earlier quoted context omitted.

I'll take this anecdote and counter it with the success of Bootstrap. You could have been using it for an entire decade now. There's a robust ecosystem around it to this day. Tailwind as the "new bootstrap" makes a decent amount of sense. These frameworks aren't an excuse to ignore and misunderstand the underlying technology. It's worth understanding CSS, but these abstractions can really speed up development time, e…

> Bootstrap's future is increasingly uncertain, of course, under Twitter/X. What do you mean? Bootstrap has not been affiliated with Twitter for more than a decade.

I honestly wasn't aware of this - even the official git org is still 'twbs' and I assumed it was still related.

I edited that part out, thanks for pointing it out.

Re: Why Tailwind CSS Won

#458

Earlier quoted context omitted.

Most JS frameworks are as bad too! Maybe the issue is that the giant pile of JS mess has created such a disaster that adding Tailwind doesn’t feel like making anything much worse. I can buy that. For what HTML is for (documents, web pages, etc.) CSS makes sense and Tailwind seems crazy. If you’re trying to code an application, for now perhaps React + Tailwind and a mountain of NPM dependencies does actually make sens…

I think your last point has legs, for sure. It makes sense that some other language will compile to wasm and make some app development more straightforward, but I don’t think the end result will be that different. The web platform is not going to move away from current paradigm without an overwhelming shift in priorities or needs. Wasm still generates html and outputs it on the screen. My biggest reason to use tailwi…

> Wasm still generates html and outputs it on the screen

Sure it can. More usefully to my point though, it can also use any of a number of C++/Rust/etc. UI libraries to render directly to a buffer or canvas, which is in my opinion a better long term solution for true applications (vs websites).

When you do that you get total layout control with no need for CSS or worrying about browser defaults.

As a random example here is the Rust egui library demo app running in a browser using WASM (no HTML): https://www.egui.rs/#demo

The speed and “native application” feel are hard to replicate in JS/HTML, as they are just not great tools for the job or rich desktop (or desktop-like) applications.

Re: Why Tailwind CSS Won

#459

Earlier quoted context omitted.

> Tailwind projects read like the wall writings of a mad man My dear pot, you should meet my friend Kettle. Really, this is a lot of text that sums up your personal preferences as to why you don't like Tailwind. Nothing concretely objective here. And, by the way, I agree with some of it! But you're also ignoring Tailwind is used by massive , engineer-first companies (such as Stripe), and the engineers in question act…

Stripe is not a dude, it's a company of many people with different skills in different areas. I also often wonder how OpenAI has a team that can create the world's top AI model currently, and yet their front-end chat app and plugin model has basic injections, usability issues, accidental user information disclosures and other novice bugs, but there you go. I guess it's possible to have a company skilled in something…

> if you like Tailwind's approach you may enjoy it coming to your language of choice, where you can code by writing very long variable names in a highly specific way, which are then read by reflection and interpreted as code.

No need for Tailwind; in enterprisey Java land we already have Hibernate and Spring Boot for those who like long, magical method names. And if you want an extra layer of obfuscation, drop Lombok in there.

Re: Why Tailwind CSS Won

#460
post #140

Gray beard's 5c: Tailwind is a farce and a catastrophe. It's as modern as the style parameter is, and it's as reusable as a moving a dirt pile from one corner to the next. You're not learning anything valuable by learning Tailwind. Learn CSS, that will stick with you for the next 20 years. It amuses me when a library is implemented 'with tailwind', which means it's totally useless to the people _not using tailwind_,…

i think it's a matter of taste and preference. your taste and preference is different than mine. we don't have to work on the same projects together.
Post reply on HN