3 ms·
My opinion, here's the deal: no, you don't need to abstract any set of classes. That defeats the purpose. But there's a catch: you must be working in a modern c
by adlpz 3y ago
My opinion, here's the deal: no, you don't need to abstract any set of classes. That defeats the purpose. But there's a catch: you must be working in a modern component-based framework to work like this effectively.
Because that's the context where Tailwind grew.
If you have your set of e.g. React components defined you don't really ever "repeat the same styles for links, buttons again and again". You just use your components. <Button/>. <Link/>. <Card/>. <Container/>. Whatever you need. And then your only "raw" tailwind in your "templates" is the scaffolding around it.
And it's great. No write-only CSS syndrome, no coupling between components, at-glance understandability of what's going on.
But you gotta be using components, otherwise it's just overwhelming.