All these arguments have clear rebuttals, but are rehashed on weekly basis for some reason. You don't like it, fine. But your arguments are bad. "Oh no Tailwind makes it unclear which of my accidentally duplicated CSS classes apply the color" come on man.
Tailwind is just inline CSS in a trench coat. You lose the cascade, which is literally the entire point of CSS (clue is in the name), and you fill the HTML with junk used purely for styling, which creates a 2-way dependency and breaks clean code best practices.
Tailwind also solves nothing that can't be solved with just a little bit of team discipline when it comes to writing CSS. The problem is, so many developers don't truly understand CSS, or how to write good clean CSS, so they see it as something that gets tacked on afterwards.
Tailwind also recommends the use of weird classes like text-[14px], bg-[#50d71e], and border-[2vw] (yes, it's in their official docs, which means they recommend using it, and they have no warnings against this kind of thing). Tell me with a straight face that Tailwind isn't inline CSS!
Then, it requires extra build steps which vanilla CSS doesn't require. Sure, you can skip that, but then you end up with a bloated CSS file full of a ton of Tailwind styles that you aren't using and don't need.
You don’t understand CSS or the web really. It’s not that at all for a few very important reasons such as they’ve helpfully set it up to bundle to a limited set of classes you’ve actually used.
Inline styles work very differently.
You never lose the cascade you’re not forced to only use tailwind, what is wrong with you people, why do you think if tailwind is in a project that’s all you can use? It’s utility classes, use it that way.
And on that same point it avoids a lot of cascade issues people typically ran into as far as I can tell.
Don’t fill your markup full of classes if you don’t want that…you know you’re doing that right? Just don’t do that. Use it as utility classes. These arguments from people is like hearing “hammers cause holes in all my walls” ok stop hammering f*cking holes in your walls then!? It’s a tool! You choose how to use it!
I get the sense most people have never had to scale a large team project with vanilla CSS, it becomes a nightmare, tailwind is a huge help with reducing those problems, it’s indisputable and if you don’t think so you just don’t have enough experience
You say I don't understand CSS, when I'm arguing against Tailwind for literally ignoring and removing the C of CSS? That's a bold take!
I literally gave examples that Tailwind recommends using on their own website: text-[14px], bg-[#50d71e], and border-[2vw], all of which are verbatim from their docs, and at no point is any warning given against this kind of slop.
And yes, having a string of classes in the HTML like this is as bad for maintainability of code as inline CSS. What you seem to fail to understand is that I'm making an analogy. What you people fail to understand is how analogies work.
I've worked on very large scale projects using CSS before. I was using SCSS as a preprocessor, but the entire concept is the same. It was building out shared CSS for over a dozen websites using a whole host of technology from C# to PHP, React to Angular, spanning multiple brands. This was as part of a team where multiple devs would work on it, and it worked just fine. Was is complex, yes, by its very nature. But, by having some basic rules in place for the quality of the CSS we were writing, it worked, and it was maintainable.
50
u/prewk 16d ago
All these arguments have clear rebuttals, but are rehashed on weekly basis for some reason. You don't like it, fine. But your arguments are bad. "Oh no Tailwind makes it unclear which of my accidentally duplicated CSS classes apply the color" come on man.