5 ms·
It's worse than that; the common arguments for Tailwind literally derive from total ignorance of how CSS is made to work, and a disposal of guidelines that deve
by timr 5mo ago
It's worse than that; the common arguments for Tailwind literally derive from total ignorance of how CSS is made to work, and a disposal of guidelines that developers would worship in any other context (i.e. Don't Repeat Yourself).
It's really frustrating to be talking with someone about Tailwind and CSS, and realize that not only do they not know what "cascading" means, they never even considered the concept might be useful in the context of a stylesheet.
- u_fucking_dork 5mo agoThe common arguments against Tailwind usually derive from total ignorance of working with CSS on large scale projects with many team members. And when this is pointed out you’ll usually get replies that just hand wave it away as not a problem, as if things like BEM were invented for no reason.
- timr 5mo agoYeah, that's a straw-man. I've worked on large-scale projects with many team members, and it's perfectly possible to use CSS as it was designed. But sure, like most tools, it starts with understanding how it works.
- pverheggen 5mo agoSure, but "total ignorance of how CSS is made to work" is also a straw man.
- deleted 5mo ago[deleted]
- 9dev 5mo agoSure it's possible, but is it possible for everyone on your team? Including the new hire, the interns, or the now-vibecoding managers? Sooner or later it deteriorates.
- miyoji 5mo ago> Sure it's possible, but is it possible for everyone on your team? Including the new hire, the interns, or the now-vibecoding managers? Why aren't we asking this about any of the things that are actually hard? Like any programming language, or databases, or caching... CSS is the easiest part of the web stack.
- 9dev 5mo ago> Why aren't we asking this about any of the things that are actually hard? We do. That's what countless abstraction layers, linters, frameworks, style guides, and CI checks are for. > CSS is the easiest part of the web stack. …and because programmers keep thinking that, they stay ignorant about CSS and structuring the styles properly - leading to the problems I described above.
- u_fucking_dork 5mo ago“That’s a straw man”, he says, as he hand waves it away as if it were not a problem
- coolThingsFirst 5mo agoAnd the cascading thing is a nightmare even after years. Whenever i have written CSS/TailwindCSS which was unproblematic to extend it was when i literally switch thinking to use least amount of properties and let the page flow. Whenever i see tons of css i know it’s brittle and will cause hours of wasted time down the line to fix something which already should have been fixed.
- deleted 5mo ago[deleted]
- pverheggen 5mo agoTailwind, JS-in-CSS, and the like have become popular because they work well with the modern corporate UX workflow. A Figma component has a certain set of styles, you apply those same styles to the corresponding React component. And none of this really violates DRY, your unit of reuse has shifted from a CSS class to a framework component. There's nothing precluding you from using an approach like DaisyUI if stock Tailwind has too much repetition for your taste.
- timr 5mo ago> A Figma component has a certain set of styles, you apply those same styles to the corresponding React component. This is what CSS classes were made for. Of all of the arguments in favor of Tailwind, this is the one that drives me battiest. Say what you will about CSS, but "give a name to a re-usable set of styles for a component" is pretty much as fundamental as you can get. > And none of this really violates DRY, your unit of reuse has shifted from a CSS class to a framework component. Sure, sure. except for the inline styles everywhere. And the fact that everything is literally being repeated all over the place. But other than that, no repetition! > There's nothing precluding you from using an approach like DaisyUI if stock Tailwind has too much repetition for your taste. ...and now you have three problems.
- 9dev 5mo ago> This is what CSS classes were made for. That brings with it the problem of naming a thousand things in a consistent way that everyone on your team needs to understand and remember, otherwise you end up with tons of duplicated classes, parallel systems, and bike shedding. Have we, as an industry, not felt this pain often enough yet? Do we really need to keep banging our head against the wall to figure out it does hurt? > Sure, sure. except for the inline styles everywhere. There are no inline styles when using Tailwind. There are references to variables from the design system. > And the fact that everything is literally being repeated all over the place. If you find yourself repeating the same sequence of classes, it's time to create a component in your frontend framework if you use one, or a Tailwind utility class. And even if you just copy-paste the same class strings all over the codebase, transport compression will eliminate that pretty much entirely.
- jim33442 5mo agoI'm fine with just the "cascading styles" part of CSS. The thing is it's also sizing and placement of elements in the webpage. Sometimes that's easy, other times there are 10 different ways to accomplish something that all feel hacky.
- thisismyopinion 5mo agoDRY can be implemented using tailwind if you know how to. You can abuse tailwind and have no structure which I've seen even seniors do. I've worked with CSS since 2001. Understood the CSS rendering engine in Mozilla like the matrix and written an absolute ton of cascading CSS using various methods and frameworks. All my stuff is now tailwind and it's pure bliss.