3 ms·
I'm glad for his (their?) success but in my personal subjective opinion I find that flooding the markup with CSS utility classes is an absolute aberration. I t
by pier25 7y ago
I'm glad for his (their?) success but in my personal subjective opinion I find that flooding the markup with CSS utility classes is an absolute aberration.
I totally see the convenience of having everything in the same place but:
1) It's much harder to read than regular CSS files.
2) It adds so much noise to the markup
3) By trying to solve everything via utility classes some situations need convoluted markup that wouldn't be needed otherwise.
- ianwalter 7y agoExtracting/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.