4 ms·
Extracting/composing utility classes into component classes using @apply has worked well for me. I was surprised that the Tailwind UI code examples don't includ
by ianwalter 7y ago
Extracting/composing utility classes into component classes using @apply has worked well for me. I was surprised that the Tailwind UI code examples don't include examples of how you would do that especially for things like buttons. Maybe they will add that at some point.
- pier25 7y agoThey actually have it in the Tailwind CSS docs: https://tailwindcss.com/docs/extracting-components/#extracting-css-components-with-apply https://tailwindcss.com/docs/extracting-components/#extracti... I'd never heard of @apply before. It sounds like a great approach.