4 ms·
This is specifically what they tell you not to do. https://tailwindcss.com/docs/reusing-styles https://tailwindcss.com/docs/reusing-styles Their advice is to
by aleksiy123 3y ago
This is specifically what they tell you not to do.
https://tailwindcss.com/docs/reusing-styles https://tailwindcss.com/docs/reusing-styles
Their advice is to use templating (components, partials, loops) to abstract and I agree. It ends up working a lot better than abstracting your CSS.
- rhuru 3y agoI am sorry I should have written it better. This is how I abstract away from tailwinds utility litter. https://tailwindcss.com/docs/reusing-styles#extracting-classes-with-apply https://tailwindcss.com/docs/reusing-styles#extracting-class...
- aleksiy123 3y agoFurther down in the link they do talk about not doing this for everything. Only for small things when templates are too much. "Whatever you do, don’t use @apply just to make things look “cleaner”"
- rhuru 3y agoIt is in general good CSS advice not just specific to apply.