AFAIK, functional CSS frameworks like Tailwind are getting relevance thanks to the recent boom of functional programming.
This trend has grown in response to how difficult it is to avoid regressions at scale - large or multiple projects, lots of components, lots of independent teams, etc.
The cascade really is an elegant and efficient idea but it becomes really difficult to manage as projects grow.
The different with inline CSS is that those helpers are the building blocks — that’s where your standardize your design system metrics.
As others have pointed out this library provides a mechanism to abstract into components as well.
What do you love about it/what am I missing? For me it felt like a tutorial on the most egregious CSS/dom anti-patterns, and I haven't been able to get past it.
It also removes the need to constantly reference CSS at all, and can just stick to HTML/JSX instead. It can get very verbose though, but that's a minor trade-off I think.
Very easy to learn and reference in future.
Documentation include examples that can be used as base for minor customisations.
From someone coming from non CSS/UI/web/design background, Tachyons is very approachable in ways others are not.
My website made with Tachyons: https://aravindh.net
For example: MA1 (margin-all-size1) and MA2 (margin-all-size2) allow me to make a component with more margin, but the margin steps are standardized so everything will follow the same sizing and fit together well, and can be changed easily in one spot later if necessary.
It really only takes a few days at most to get used to the class names, and then you can easily tell everything about the component by just looking at the HTML. We follow an internal rule to place spacing first, then borders, then text, then colors at the end.
Honestly these aren't too bad. But all the CSS frameworks I've seen of this style instead are like MA-10 (margin all 10- pixels) and MA-20 (margin-all 20 pixels) which of course completely defeats the idea of standardized steps beyond limiting you to that subset.
I think there is some value to a few of these styles in any project but ultimately you get more standardization with semantic names. "alert-danger" instead of "alert-red" for example.
However, my point was that it's a great fit for React and other SPA frameworks, where you can just create a <DangerAlert /> component instead, and inside you can use component styles.
But whatever works for you.
Class names should be used sparingly and describe the semantics of an element rather than its visual appearance. It should be something like class="button submit disabled" instead of class="f6 link dim br1 ph3 pv2 mb2 dib white bg-black".
If anything these styles should be exposed as sass mix-ins that you can use in your own styles. So you have a named set of style mix-ins that do not pollute class names.
Especially in a javascript driven web application you may want to select all "buttons that are disabled". But you never want to select elements that "have a rounded border of 2 px and a grey background and italic font style and....". This takes class names ad absurdum.
is selectable with
[disabled] { }
or [disabled="disabled"] { }
And [disabled]:not(.greyButtonStyle) { }
does the last example if you classed that style, doesn't it? I've only done a little CSS, not very recent ... unless you're recruiting, then I'm an expert ;o).I imagine though there are times when you want to class (some) button tags as .button.