Assume that I know _nothing_ about Tailwind, sell it to me. I'd appreciate it. Thanks.
Naming is hard. No more naming.
Switching between your markup and your CSS added friction to your flow. No more friction.
Avoiding problems caused by overly aggressive rules / cascade/ whatever is mostly a thing of the past.
I could go on, but if it’s not obvious, I absolutely love it. And the Tailwind UI project is 100% money we’ll spent, too.
That's kind but they have earned shedloads already (over $2m USD as of Jan 2021 [1]). That's on top of the $2.3m for the Refactoring UI ebook [2].
1. https://www.smalltechbusiness.com/monetizing-open-source-tai...
2. https://twitter.com/adamwathan/status/1289702466754211842
Tailwind removes (or wilfully ignores) the "cascading" from css. It breaks all good, old css design patterns on purpose - in favor of "widget-level" styling.
It also effectivly builds its own (extendable) style language via named classes, ending up somewhere between "semantic" and "micro-styling" - but allowing for refactoring as needed. It reduces CSS to an implementation detail.
For example, in "Agile Web Development With Rails 7"[1], a number of form fields are initially styled as:
... class="block shadow rounded-md border border-green-400
outline-none px-3 py-2 mt-2 w-full "
Later reactored to: ... class="input-field" via tailwind:
.input-field { @apply
block shadow rounded-md
border border-green-400 outline-none
px-3 py-2 mt-2 w-full
}
On the surface similar to defining a css class - but effectively scoped to your own code.In a small project, where you're publishing documents - tailwind might not be great - but in a large project, with many widgets it is a good fit.
Similar to how "movable code" (js on the client) might be a better fit than REST for web applications (as opposed to web pages).
[1] https://pragprog.com/titles/rails7/agile-web-development-wit...
It may be a longer read than you were looking for, in which case I’d say just try it on a small project next time you get the chance. It looks like it wouldn’t work, but it really does.
Also not to mention, you skip all the nonsense of the CSS in JS and the need of tools to extract the CSS from JS. Also other big win is that you can use with other projects not based on JS, I'm toying with a WASM app and use tailwind without issues, just run the tailwind bin on my app change (takes a second or less to generate the css file), the only downside here is the need of nodejs (you might be able to download the binary directly and run that, like I do on CI).
In my opinion, Tailwind is to CSS what jQuery was to Javascript. It's just the right level of abstraction that you need.
But you have to just try it for yourself and experience it. I'd recommend using it with VSCode's intellisense plugin.
Maybe you mean classes organized with a high level of abstraction that have multiple rules and are meant to be related to the document structure in a specific way?