Live data from Hacker News

Why Tailwind CSS Won

matt-rickard.com

271–280 of 559 posts

Re: Why Tailwind CSS Won

#271
post #224

Earlier quoted context omitted.

No, the element inspector will tell you what css file the rule is coming from.

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.

Re: Why Tailwind CSS Won

#272
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’ve studied and used CSS for 17 years. I’ve always enjoyed it and rarely complained. But tailwind is a joy to use and I prefer it over writing CSS.

There’s no replacement for understanding the underlying technologies of frameworks, that’s true. Compared to some frameworks, tailwind is only a small layer of abstraction, one that does not obfuscate the underlying tech away. It does not prevent you from learning or using CSS. That’s why it’s so good.

I frequently drop tailwind into projects because I know the shipped code footprint is low and it accelerates design.

Re: Why Tailwind CSS Won

#273
post #183

Earlier quoted context omitted.

I’ve learned CSS, used Bootstrap, and tried a bunch of other tools. Tailwind ecosystem is the fast approach to building web UIs in my experience. It doesn’t matter if you know CSS or not. Nobody gains if you know CSS per se. People gain when you deliver finished projects. Tailwind helps ship projects faster.

That is the point: which kind of projects? You all fight, but nobody says what exactly they develop. A webpage and Tailwind is absolutely fun. An app with reusable complex components, Tailwind is a pain. Themes, dynamic tailwind is a pain, static, tailwind is ok. There are endless possibilities. The problem is, that some people think you can use Tailwind for everything and then they made simple things unnecessary com…

Not my experience. We built a full rather complex and feature full application using Tailwind. How? Reusable components (we use Vue, but that’s just one option).

I remember this being endorsed approached by Tailwind creator.

No complaints.

Re: Why Tailwind CSS Won

#274

I find Tailwind's claim that you can "build modern websites without ever leaving your HTML" to not be entirely correct. Instead of context switching from my `.html` to a `.scss` file, I just end up context switching to their documentation website to find the syntax they used. It's internally inconsistent, so you can't guess what the Tailwind class name is for styling, while you can do this for CSS on the majority of…

It's the minor inconsistencies that prevented me from using Tailwind on any serious projects. I've never been able to get past their choice to use text-{color} instead of font-{color}.

Re: Why Tailwind CSS Won

#275

Earlier quoted context omitted.

None of this mirrors my experience whatsoever. That’s “how things are” for me. I know CSS very well and Tailwind is probably the largest productivity boost I’ve encountered since, I don’t know, learning vim? It’s way faster than SASS/SCSS which is itself way faster than raw CSS. It also yields far more self-contained and more readily composable components than any other styling mechanism. Your comment doesn’t resonat…

This is where I wish we still have upvote numbers on HN. How many people agree with you vs parent and grandparent comment? I've been doing web dev since I was a kid in mid 2000's and I think tailwind is phenomenal in enforcing style, portability, speed, etc. I recently started to writing a single .html file proof of concept for something and it was shocking how poor the experience is of `style="..."` is in comparison…

Utility classes aren't new to TW.

Re: Why Tailwind CSS Won

#276
post #249

Earlier quoted context omitted.

None of this mirrors my experience whatsoever. That’s “how things are” for me. I know CSS very well and Tailwind is probably the largest productivity boost I’ve encountered since, I don’t know, learning vim? It’s way faster than SASS/SCSS which is itself way faster than raw CSS. It also yields far more self-contained and more readily composable components than any other styling mechanism. Your comment doesn’t resonat…

My experience mirrors yours 100%. What the parent comments seem to be describing are Tailwind in a context where people don’t know CSS that well. Yes, that will be a catastrophe. But so will SASS or vanilla CSS — even more so. Tailwind is a utility, not a replacement for fundamental knowledge.

On the other hand, people that know CSS very well will not need suddenly tailwind to get some utility classes.

Re: Why Tailwind CSS Won

#277

I think Tailwind is more accessible to many[*] less experienced or CSS-oriented developers. Big generalisation , I know, please don't yell at me, but many of us can get 99% of Tailwind's value with UI libraries supporting: 1) style encapsulation, 2) colocated presentation/content/behaviour and 3) a more minimalist mindset/habits when building UIs (e.g. relying on simpler styling hierarchies, native DOM elements, sema…

What's up with the colocation argument? Colocation of markup and business logic makes a lot of sense. Colocation of presentation? Why do you even need that? Presentation is abstracted into CSS by design. Having presentation decoupled allows you to abstract around visual elements on a page at their instead of having to sufficiently wrap everything in divs classes just to the right level to make the CSs classes work.

> Presentation is abstracted into CSS by design.

The structure of your HTML is as integral a part of the presentation as your CSS is.

Re: Why Tailwind CSS Won

#278

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…

None of this mirrors my experience whatsoever. That’s “how things are” for me. I know CSS very well and Tailwind is probably the largest productivity boost I’ve encountered since, I don’t know, learning vim? It’s way faster than SASS/SCSS which is itself way faster than raw CSS. It also yields far more self-contained and more readily composable components than any other styling mechanism. Your comment doesn’t resonat…

Agreed. I've been using CSS for over two decades now. The composibility, reusability, and maintainability benefits of CSS have just never materialized outside of some very tight scopes such as toy projects or single developer projects as far as I've seen. And we pay heavy costs having half of the context of whatever we're working on living in an entirely separate file (any generally multiple discrete areas within that file or even multiple files) in a way that's poorly discoverable and debuggable.

Tailwind finally throws in the towel on all of that and just brings the full functionality of CSS to inline styles and leaves reusability up to whatever framework and templating you're using on top of HTML/CSS.

When I walk into a project using Tailwind I spend way more time actually working on _the project_ and way less time looking at the browser devtools trying to disentangle and chase down the complex web of interacting styles that are somehow working on the markup. Everything I need to know is already in front of my face directly attached to whatever element it's related to.

It is another thing to learn but it's pretty darn straightforward and well documented. Coming from a solid CSS background it took in the manner of hours before it clicked in my head and I was productive. And that largely translates to whatever project I'm digging in to instead of having to spend a bunch of time learning each project's bespoke styling system.

Tailwind is way less technically elegant than CSS, but the technical elegance of CSS has always seemed more lofty and academic than anything.

Re: Why Tailwind CSS Won

#279
post #93

Earlier quoted context omitted.

Wrong, it ships the lowest amount of CSS it can

This is only 1 perspective (which is correct in most cases but not always). It can also produce massive HTML (not CSS) making it worse than pure CSS solution.

Even when used as expected, per-page, you end up with unnecessary html and css, because tailwind can't combine the classes used from other pages. For one to be able to use tailwind as efficiently as site-covering custom made CSS, you'd need to collect the HTML or CSS Classes for the whole site and compile the CSS from that, but tailwind is waaay too slow for that to even work - not to mention, node.js can't even handle that amount of classes in memory (4GB Default).

I'm very well aware of this because I tried to make it as efficient as possible.

Re: Why Tailwind CSS Won

#280

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…

None of this mirrors my experience whatsoever. That’s “how things are” for me. I know CSS very well and Tailwind is probably the largest productivity boost I’ve encountered since, I don’t know, learning vim? It’s way faster than SASS/SCSS which is itself way faster than raw CSS. It also yields far more self-contained and more readily composable components than any other styling mechanism. Your comment doesn’t resonat…

I think I'm pretty good at CSS and have been using it for maybe 15 years.

I find tailwind just makes my life easier. Sure, it's not perfect, but I really don't enjoy giving every div and container it's own unique name and hoping none of the names ever clash with my colleagues unique names etc.

Also, I came to realise that websites never strictly follow the same design rules throughout. There are always exceptions. So you are constantly creating new style classes that are slight modifications of others. And keeping this all in your head is not easy.

I know a lot of people disagree and feel like tailwind is a problem, but for me I can just concentrate on making a great site rather than worrying about how a slight change to the styles inside .container might break some obscure part of my website.

Post reply on HN