4 ms·
It's as if one person was arguing for hard-line separation of style and content, and another person was arguing that in-line is the way to go, and then Tailwind
by reaperducer 7y ago
It's as if one person was arguing for hard-line separation of style and content, and another person was arguing that in-line is the way to go, and then Tailwind came along and said, "Why not both?"
So now it's the worst of both worlds: an abstraction layer and dirty code.
- city41 7y agoTailwind isn’t the first to take the utility class approach. Atomic CSS was an early implementation of the idea: http://acss.io http://acss.io
- reaperducer 7y agoIt doesn't have to be first to be bad. They can both be bad.
- blattimwind 7y agouikit as well (the CSS framework, not the Apple thing)
- city41 7y agoIt's not necessarily bad. There are pros and cons to all css approaches. Atomic classes definitely have their fans. It's more a question of which pros and cons matter to you.
- csande17 7y agoI think it's a little more subtle than you're saying. When you use inline styles for everything, you're making the initial development a little faster by making future maintenance and changes a lot harder. (Like, if you decide headings should be italic instead of bold, that's a one-liner fix if you're using CSS properly, but if you're using inline styles you have to individually fix every heading on every page.) So most people have internalized "don't use inline styles for everything" as a general rule. But if you don't actually care about that sort of future maintenance (or you're charging hourly for it), then using inline styles for everything looks really attractive to you! But you can't literally use inline styles for everything because even non-experts know that using inline styles for everything is bad for future maintenance. So instead you pull in Tailwind so you can say you're using a CSS framework.
- iudqnolq 7y agoOr each of your headings is a React/Vue/Web/Polymer/etc component and that's a single edit. Also, sed.
- Nullabillity 7y agoSure. And in that case, just use inline styles (or CSS-in-JS, or whatever else you prefer).
- iudqnolq 7y agoSure. I view tailwind as a moderate abstraction over inline styles.
- ec109685 7y agoAnd then the components get bloated to handle logic differences between views of the component, so you went from bloated CSS to bloated components and the need for everything to be a component in order to share a single look and feel. Once the components get too bloated, you start forking them, and you are back to each page looking subtly different.
- iudqnolq 7y agoSure, no magic bullet.
- Joeri 7y agoBut can you realistically change the design centrally of something built only with utility css classes? If the class of an element doesn’t specify its semantics you cannot properly target it in a redesign without updating the markup.
- gyrgtyn 7y agoI've never succeeded in that with semantic css either