3 ms·
Exactly. This is a non-issue if you use @apply (as people should).
by romanovcode 3y ago
Exactly. This is a non-issue if you use @apply (as people should).
- foldr 3y agoBut if you make extensive use of @apply then you're just writing normal CSS with an unnecessary preprocessing step.
- progx 3y agoThat is the point. As long as you use tailwind as it is, it works good and you can have fast results. But with reusable components or unified design, you enter the @apply hell. At this point i could not see benefits of tailwind.
- willdr 3y ago@apply is an antipattern.
- d1sxeyes 3y agoHm. @apply solves a problem. Basically you’re better off writing with the utility classes if you can extract your component out to… well, a component. If for whatever reason you can’t do that, @apply helps you avoid repeating yourself, which seems to be a reasonably good alternative to what’s in TFA. But there are other (better) options available in most circumstances. Tailwind actually have a pretty good write up here: https://tailwindcss.com/docs/reusing-styles https://tailwindcss.com/docs/reusing-styles That said, it’s easy to come up with a ‘gist’ like > The semantic version is 8 × smaller, renders faster, and is easier to modify and extend. but then underneath say you’re not minifying, and you’re not publishing the source code… it’s almost like the author had the conclusion before starting to experiment.