Sure, let's take long strings of barely-scrutable utility classes and make them transform into CSS-in-JS statements under the hood via an overcomplicated build pipeline—WTAF.
What I find so ironic is pure, native, truly-modern CSS with properties/variables, Flexbox, Grid, encapsulation via Shadow DOM if you want it, etc. has gotten so-o-o-o good, you barely even need a framework anymore. Stuff like Tailwind feels like it's solving the problems CSS might have had…er, ten years ago.
Oh really? Then why is markup written with the Tailwind build process in mind fundamentally incompatible with every other CSS framework/no framework? I've switched entire sites from one traditional framework (e.g. Foundation) to another (e.g. Bulma) in a matter of hours. With Tailwind, that'd be nearly impossible (and the @apply trick in external stylesheets actually makes that process worse, not better).
OK, let's say you have a "styled box to hold a blurb of content" and in Framework A it's a single class: "callout". But in framework B, it's called "box".
You can switch your element from "callout" to "box" and likely move on.
But if your element is nothing more than twenty utility classes, good luck with that.
Similarly, if you have a custom class in your stylesheet using normal CSS properties you wrote alongside Framework A, you can use that same custom class with Framework B with little to no modification because it's "real" CSS.
If instead your custom class is twenty "@apply" statements using utility classes, good luck with that.
So again I say: Tailwind is fundamentally incompatible with every other CSS framework/no framework.
Assuming that we're talking about 3 systems where the html is exactly the same between them, and we just want to add a single class on the outer element in order to style the whole component. I can do that with Tailwind.
Yes what you're missing is the hypothetical scenario of using 3 full blown CSS frameworks that apparently share the exact same HTML structure for all their components, which we all know is a farce.
Jared here is just trying to make up bunk reasons for why he feels his superiority complex about CSS is best way.
Yes, your ".box" example is 100% tied to Tailwind. Remove Tailwind from your build process, and that stylesheet is broken. So you can transition sites to Tailwind, but transitioning a site away from Tailwind proves extraordinarily difficult.
Wait, that was the challenge though. We were swapping away from Tailwind so another css framework could style the box. Now you want to keep Tailwind? You can have that cake if you want it. Just render the output one time and link to the rendered css. It’s cleanly crafted css that could have been written by hand.
Sure, let's take long strings of barely-scrutable utility classes and make them transform into CSS-in-JS statements under the hood via an overcomplicated build pipeline—WTAF.
What I find so ironic is pure, native, truly-modern CSS with properties/variables, Flexbox, Grid, encapsulation via Shadow DOM if you want it, etc. has gotten so-o-o-o good, you barely even need a framework anymore. Stuff like Tailwind feels like it's solving the problems CSS might have had…er, ten years ago.