So far, the way I feel about Tailwind is that, unlike most CSS frameworks which simply gives you a style kit to use, it is a framework to help you build your own kit (sort of what Laravel is for PHP). And I love it!
One thing that I think would help this go a little further is the ability to create "abstract classes". These would be declared but wouldn't be outputted in the final CSS (while being available to be used with the @apply function).
Something like this:
@abstract abstractBorder4 {
border-bottom: 4px solid #dae4e9;
}
.your-class {
@apply abstractBorder4;
}
Pushing this concept a little further, Tailwind could give you the ability to import the utility classes as common classes OR as abstract classes. This would give the developer the ability to use Tailwind as utility-first framework (as it was intended) or use it as utility abstract classes to build their style kits with their own classes consistently.
PS: I do realize this diverges from Tailwind's philosophy and proposed workflow (sorry :cold_sweat:). But I feel that this could give the framework more flexibility and broaden it's usage among developers.
While I get the use-case here, I wonder if this is functionality better provided by an existing tool, like Less or Sass.
Really our goal with Tailwind is limit how much CSS you need to write. Yes, we provide helpers @apply and @responsive to make it easier to create components and add your own utilities, but beyond that I'm not sure how much more CSS preprocessing we really want to do.
I hope that makes sense. Closing this as there are no plans to add this functionality right now.
Thank you for your reply!
I understand your point. Like I said on the post, I understand that this idea would diverge from your philosophy, but I felt like sharing it anyway.
Keep up the good work. It's awesome!
Most helpful comment
Thank you for your reply!
I understand your point. Like I said on the post, I understand that this idea would diverge from your philosophy, but I felt like sharing it anyway.
Keep up the good work. It's awesome!