Any suggestions to what to use instead? I used Bulma in the past (I'm not an every day frontend engineer)
Tailwind is a leaky abstraction
31–40 of 391 posts
Re: Tailwind is a leaky abstraction
#32The first example provided of building a custom animation is already outside of Tailwind's core use case of rapidly building common UI while only having to look at the markup. The occasional fine-tuning is usually when it's time to step over to your CSS file and write a custom component. Anyone who builds UI for a living, ideally already having a well-developed mental model for how CSS works, immediately understands…
Just chiming in to say I'm an outlier in this respect. I've been doing front-end focused dev for well over a decade, using every system imaginable, and I'm yet to see the appeal of Tailwind. I have tried it, and many of my use cases are supposed to be what it's best at (rapid prototyping etc), but I still dislike it in many aspects. That's fine though, if it works for other people then all the power to them.
It's likely that because many of the things I'm building are relatively bespoke, and therefore require breaking out of Tailwinds boundaries (like the authors examples), that I haven't gelled with it yet.
Re: Tailwind is a leaky abstraction
#33Tailwind has made building components in React an absolute joy for me. I don't need to scroll up to find my css-in-js definitions, I don't need to change windows to find the CSS modules, it's all there, in one place.
A bigger project with multiple pages having full on Tailwind css classes peppered everywhere looks to be a nightmare.
Does anyone have experience jumping into an existing larger project with legacy tailwind all over the place? Would you do it again?
Re: Tailwind is a leaky abstraction
#34I used Tailwind for a year at work, never having used it before. I found it overrated, frankly, and not much of an efficiency boost. We had a "don't use inline styling or your own CSS classes if a Tailwind class already exists" rule. While the reasoning was understandable, it meant that every time I wanted to style or position a component, I had to browse the Tailwind docs to make sure I wasn't duplicating something.…
Re: Tailwind is a leaky abstraction
#35You 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…
This becomes even harder when you refactor/reuse things.
It is then worse when you want to maintain.
With an approach like tailwind, with non-specific css, the coupling is ensured, the css is re-usable, the patterns are re-usable, re-factorable with a single copy paste.
I don't use tailwind yet, but just using exclusively utility classes changed my ease in writing, refactoring, re-using and maintaining code by an order of magnitude.
Re: Tailwind is a leaky abstraction
#36Re: Tailwind is a leaky abstraction
#37Re: Tailwind is a leaky abstraction
#38Re: Tailwind is a leaky abstraction
#39Re: Tailwind is a leaky abstraction
#40In reality, I don't think that's necessarily a bad thing. When Rails came out, people ranted about how PHP was bad practices because it mixed display and business logic. Look at what the frontend has become now with React and Nuxt and the like, basically just PHP all over again. Is that bad? Well, people seem to like it, so I don't think so.
In other words, I totally agree with this article but I've given up trying to make any sense out of the frontend world. Tailwind is for people who don't want to learn CSS[1], which seems like a frighteningly large amount of web devs. But, ultimately, that's OK. I will continue to happily ignore it.
My hope is that will some CSS changes landing soon (in particular :has and nesting selectors) we will see more respect given to CSS as a declarative language for defining UI, instead of just some boilerplate to make your page look pretty.
[1]: see replies below, this is wrong :). nisegami said it much better: Tailwind is for people who don't want to use CSS as it was intended. It's like a simplified execution model for it.