What? I thought the point of this was for use with composable JS components.
You're manually writing and updating attributes like this?!
class="text-4xl sm:text-6xl lg:text-7xl leading-none font-extrabold tracking-tight text-gray-900 mt-10 mb-8 sm:mt-14 sm:mb-10"
How could you possibly manage this without components? Ctrl-F "lg:text-7xl" and replace?When are you changing every single instance of "lg:text-7xl"? More often you're probably making a change in one single place in the app, in which case this is incredibly easy, you just make your change where you want. You're not slowed down by digging through layers of abstraction cruft and indirection until you find the right place to make the change.
If you're doing an entire site design refresh, then doing some find and replace isn't really that crazy. For something you do relatively infrequently like this (maybe every couple of months or even every couple of years?) it's not a big deal if it takes a little bit longer. And likely you'll need to look through and test your changes on every page one by one anyway, to make sure you're not breaking anything you didn't mean to. You'll need to do that whether you changed the definition of a css class, or you made a bunch of inline changes, at which point making the actual code edits inline probably isn't even the bottleneck.
But again, that's perhaps a bit extreme of a way to look at it. You will inevitably have some layer of abstraction anyway, something like components or templates or partials, in which to wrap your styles.
I'm not, I'm changing some 7xl-sized text in multiple places. But I don't want to change every element that is .lg:text-7xl already.
> If you're doing an entire site design refresh
I'm not
> You will inevitably have some layer of abstraction anyway, something like components
I already do, they're in JS, and much more powerful and extensible than HTML attributes.
You absolutely do skip between lots of HTML/JSX/VUE files, but that's true of any project. The point of tailwind is to keep you in the view layer of your project and not jumping between more than a browser and one tab in a code editor when building your UI.
It would replace every `.font-extrabold` element on the page.
What if I only want to update my extra bold headlines, not the extra bold subheadings? Global search-and-replace breaks my subheadings.
>> 5. Not skipping back and forth between HTML or CSS files [with Tailwind]
> You absolutely do skip between lots of HTML [with Tailwind]
??
Anyway, couple of weeks back I needed to make a website for a mate and decided I’d give tailwind a spin. My god does it make css fun again. I’m not sure how you look after sprawling styles in a bigger app (though I’m sure I’ll figure something out) but having the right combination of safe css, everything right there and responsive styling locally is a dream. I’m totally sold.
1. After purged the CSS file is really, really small.
2. Hopping into all of my projects and not having to remember new class names.
3. Not having to come up with new class names.
4. Not worrying about making a change in a class and having unintended consequences.
5. Not skipping back and forth between HTML or CSS files.
That said, if you don't dig it, there are plenty of other great frameworks, naming conventions and approaches that people use. Or start from scratch and roll your own.
For frameworks I flirted with InuitCSS for a bit. It's pretty nice and after digging through the code I realized it's not as complex as it first appears.
I also like Andy Bell's approach with Cube CSS.