Live data from Hacker News

Tailwind is a leaky abstraction

jakelazaroff.com

351–360 of 391 posts

Re: Tailwind is a leaky abstraction

#351
post #107

Tailwind is awesome for those who don't know much CSS or dislike to work with CSS directly, or it is great for teams, that are not able to define general rules. If you know CSS, you have huge problem to use a tool like Tailwind, cause you always feel like "how does this save me work?" it doesn't.

> If you know CSS, you have huge problem to use a tool like Tailwind, cause you always feel like "how does this save me work?" it doesn't.

It absolutely does. Why would you speak for everyone who "knows CSS"?

Re: Tailwind is a leaky abstraction

#352

Tailwind is like a tool developed with the motto that we can hide complexity for you wonderfully. I don't think hidden complexity is a good thing. I understand why people like it, but I don't like the way it's used.

It isn't hidden, you can just mouse-over the classnames, jeez.

Re: Tailwind is a leaky abstraction

#353
post #47

These are fairly complex use-cases that aren't needed for 99.9% of CSS people write. In most cases I'm throwing together a handful of components in a flex container or right-aligning some buttons or something. And for that typical CSS usecase, I find Tailwind way better both for quickly iterating and for hopping into code someone else wrote. I love not having to bounce between and cross-reference 2 (or more!) files (…

The other cool thing is that you can code up your design system in the tailwind config and never have to worry about devs not using the correct sizes/colours/etc.

Re: Tailwind is a leaky abstraction

#354

Earlier quoted context omitted.

That's not quite the definition they are positing. Many of the classes in Tailwind have near or actual 1:1 mappings to CSS, but with slightly different names or semantics. A better JS analogy might be something like Coffeescript; I remember avoiding it because it felt a bit superfluous and hence not worth the tax (of adding a tool). With Tailwind, whatever the actual merits, the biggest points of traction (IMHO) are…

I use Tailwind for a SaaS app because of TailwindUI and I'm pretty happy with it. I also used the Marketing page examples to put together a website[1] pretty quickly. When the app UI gets more complicated the need for design skills definitely creeps in. But, taking a step back, using a wireframing tool like Balsamiq, and having another look through the component catalog has gotten me pretty far. I'm happy with our ab…

Just an FYI, the logo on the site you posted gets deformed on mobile when there’s not enough space for it and the buttons on the right to live all on the same line.

Re: Tailwind is a leaky abstraction

#355
It hit me when I had to google a translator for tailwind. Why do I use tailwind if I already know CSS? Then later it hit me again, why is it called cascade style sheet - it's supposed to be separated the style from markup. And well why use an entire JS engine to rewrite some CSS.

Re: Tailwind is a leaky abstraction

#356

To start, it's ok to not like Tailwind. The author's complaints are valid in the sense that Tailwind doesn't really solve the edge-case problems they apparently have. But the author finishes by saying "Maybe you really want to avoid coming up with names." And yes, I really do want to avoid inventing names and I'll tell you why. If I have two projects both written in Tailwind, it's trivial to switch between them and m…

Well you could also use atomic design, essentially writing the btn and pagestyling separately and hoping they wont interfere. Any tool will have a tradeoff.

Re: Tailwind is a leaky abstraction

#357

I haven't actually used tailwind yet. But writing CSS -- usually with SCSS, sometimes bootstrap, sometimes just totally DIY -- I have _never_ managed to keep my CSS well organized. It always eventually becomes an unholy spaghetti mess, including overrides of overrides. So my interest in tailwind or "utility" approach generally (I have started using bootstrap utility classes more), is not to avoid having to know CSS,…

It's not possible really. As example we still cant use query selectors based on parents width. What do we do? Do we put all mobile styling in one big query selector with components inside or do we create many query selectors per component?

Re: Tailwind is a leaky abstraction

#358
post #296

Earlier quoted context omitted.

You can still do that though. I swear half the Tailwind haters haven't used it for more than 30 minutes, or at all.

Then what's the advantage of Tailwind?

Standardised and clean CSS syntax. The benefits in that context are debatable, a component based frontend architecture is where it absolutely shines. If you end up using it in that context you won't need to ask this question, it quickly becomes clear that it's the optimal path.

Re: Tailwind is a leaky abstraction

#359

Earlier quoted context omitted.

But you can create custom classes using @apply. If you're doing that alongside using it in components then it's incredibly DRY and far more efficient than anything else I've ever used in the last 20 years.

What's the difference between custom tailwind classes and... regular CSS?

Once familiar, it's far quicker to read, write and reason about than raw CSS, in my experience.

Re: Tailwind is a leaky abstraction

#360

You either use a generic CSS or a generic HTML. Everybody who picks Tailwind decides to use a generic CSS and a specific HTML. I like the old school approach of having a clean and semantically correct HTML without any styling information. And then implement the "theme(s)" in CSS. Makes just more sense to me and goes along with the idea of CSS - separating style and content. But the recent adoption of tailwind make me…

It goes to say that it would be a computational nightmare to make computers understand styling, while HTML is very understandable for both humans and computers
Post reply on HN