Hacker News new | past | comments | ask | show | jobs | submit login

I don't feel this point is strong because when you look at some of the most popular Tailwind components or templates in the ecosystem, such as the one made by the Tailwind people, the Tailwind code is still pretty crazy.



> the Tailwind code is still pretty crazy.

The rendered output is crazy, yes. But this argument applies to every JS framework ever created.

Authoring the code is best encapsulated by components. If you look at the source files available for their paid templates, they are all componentized.


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 sense.

Really I think going back to application coding via something like WASM surely has to replace all that though.


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 tailwind is maintainability. Having everything right in front of me with only the tiniest of abstractions, makes it really simple to refactor and maintain. I can confidently delete “CSS” and know it has no side effects. I can cut and paste a block of html and it will render EXACTLY the same. I don’t have to worry that Steve used a generic sibling selector in a CSS file 3 years ago that is screwing with my layout/design.

Is the HTML more bloated than if I had written “normal” css? Yes, but I think it’s worth the trade-off. It’s important that we can agree that their are trade-offs and then it’s up to each project to decide if those are worth it for their use case.

I’ll also mention the actual CSS file is crazy small as well since the tool only generates classes that are actually used in your project. No more ever-growing css that other people are afraid to delete for fear of breaking some legacy page!


> 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: