Hacker News new | past | comments | ask | show | jobs | submit login

I tried to avoid using @apply but that makes creating variations (e.g. of button styles) REALLY hard — as your code is just littered with class names. Plus if you're adding :active :hover and :focus styles, you have to do it on ALL the variations on all of the pages. It's frustrating and takes a really long time.

I've moved to using @apply in a few generalized classes and I love it, since my class names like "btn" "btn-success" "btn-success-outline" describes what I want, and I can easily go in and change them.

I'm not creating a new component for every tiny thing, like a button or a link, just so I can avoid using @apply...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: