|
|
|
|
|
by francislavoie
2 hours ago
|
|
Saying "unless you use @apply" invalidates this article for me. Everyone knows that @apply only exists as an escape hatch, it is not supposed to be used, except for when it's necessary like for compatibility with libraries that declare their own classes that you need to override. The most commonly repeated point in the article is "escape hatches bad" and I think that's completely absurd. Of course you want escape hatches, otherwise when you do hit an edgecase you get stuck with no solution. That's exactly what would force you to throw away that approach and pivot. Tailwind doesn't have that problem because it was designed to include escape hatches. Users deciding to use those escape hatches instead of sticking to a design, isn't Tailwind's fault. |
|
I think what Tailwind actually needs is more abstractions, not to discourage the use of the sole abstraction @apply