Hacker News new | ask | show | jobs
by seer 881 days ago
Oh yeah it does feel weird “dirty” somewhat.

But to your suggestion - you can! Thats what components classes do in essence. When you have a bunch of styles that _always_ go together - you bunch em up.

But in practice it is usually simpler to keep the classes and use other templating features of your platform to achieve this.

It becomes extremely nice as every time you need the question “why is my html look like this” answered, there is no hierarchy of other files to dig through - its all just there.

And as with any tool you can abuse it in ways that are not intended - seen plenty of ugly tailwind examples with tons of weird unruly code. But thats even more true for css itself. Omg the horrors I’ve seen with custom raw css cans still give me nightmares.