A lot of people seem to like tailwind though so I am probably missing something.
Tailwind is a leaky abstraction
321–330 of 391 posts
Re: Tailwind is a leaky abstraction
#322This really was an interesting read. It shows the same thing can be seen as good and bad by different folks.
Link: https://www.unsungnovelty.org/posts/05/2022/explaining-what-...
Re: Tailwind is a leaky abstraction
#323>Tailwind is a Leaky Abstraction Yes! Yes it is! And that doesn't matter a single hoot! Go and write your complex CSS to do your perspective shenanigans, that's absolutely fine. Don't be a purist who MUST HAVE UTILITY CLASSES AND ONLY UTILITY CLASSES. And you can't, and shouldn't, write tailwind while being ignorant of CSS. You've set up a strawman and knocked it's head off, but I can clearly see you boxed a scarecro…
Re: Tailwind is a leaky abstraction
#324Earlier quoted context omitted.
It's not like the `style` object is far away. Nothing about Tailwind prohibits you from using normal classes.
Yes tailwind let's you reach through and apply some CSS directly. Almost like its an abstraction that exposes, or leaks, that which it attemps to abstract. A "leaky abstraction" if you will.
Which... is asinine. One is simply a redacted and simplified expression of the most common implementation of the other case.
Tailwind falls into the same bucket - in my opinion. Like most frameworks, it's not there to handle your niche and complex use-cases. It's there to provide bumpers that push you into a pit of success for common use cases.
When you need to do something that's not common - use the escape hatches that are built in. That's not leaking - that's giving you the flexibility to fall back to a custom implementation.
The goal just isn't "abstraction" from css. It's common-sense, local, and consistent styling for common cases. I can build most lego sets from single square blocks - but it's nice to have a bigger selection available. Does that mean I need to understand those bigger pieces to make sure they fit, don't have weird gaps, and line up? Absolutely. Does that mean I shouldn't use them? No, probably not. But it does mean that sometimes I still need single square blocks.
Re: Tailwind is a leaky abstraction
#325What’s number 2 right now?
Re: Tailwind is a leaky abstraction
#326I’m just gonna sit this one out and pick one of the underdogs. Never been a fan of utility classes. What’s number 2 right now?
Re: Tailwind is a leaky abstraction
#327Re: Tailwind is a leaky abstraction
#328Earlier quoted context omitted.
> Also, it makes me sad to see people so eager to throw away separation of concerns I don’t think it has ever lived up to expectations, HTML+CSS in that way is simply broken. You can’t really write CSS without hard-coding the HTML structure, so you might as well do it in one file.
I fought against this for a long time, but I have to agree. CSS right next to your HTML/Components makes it a lot easier to keep track of. Maybe it would've been possible to build tooling around using CSS files that created the same benefits, but now we just don't have to any more.
Re: Tailwind is a leaky abstraction
#329I don't really get Tailwind. Whenever I am looking at a layout, I am doing it in the inspector tools, not in the stylesheet or the html file. I don't care if the class is called top_bar or foo_bar or if the styling is done inline. I do care that is had a border-radius of 10px,. With tailwind I have to somehow know that border-radius is supposed to be "rounded". I have to learn a whole new language and constantly tran…
Yeah I agree with you there. If you're writing tailwind you have to constantly have the tailwind docs site open.
Re: Tailwind is a leaky abstraction
#330Earlier quoted context omitted.
It's not like the `style` object is far away. Nothing about Tailwind prohibits you from using normal classes.
Yes tailwind let's you reach through and apply some CSS directly. Almost like its an abstraction that exposes, or leaks, that which it attemps to abstract. A "leaky abstraction" if you will.