News for hackers. Stuff that matters.
Re:TailwindCSS v2.0 by rvense on Thursday November 19, 2020 @01:22AM (#25146781)
Not everything requires making a component. A CSS class can be fine, and I'd always use the least powerful way first. This is how the framework is meant to be used - that's the entire reason for having @apply.

https://tailwindcss.com/docs/extracting-components

I don't understand what you mean by ad hoc. It's a very structured approach. When utility classes don't work, you make a semantic class. If that doesn't work, you make a component. You can even use BEM naming if you want, you'll just be making a lot fewer classes.

There are no comments on this comment yet.