Hacker News new | ask | show | jobs
by klysm 1366 days ago
I strongly dislike having all the css for the site in one place because the dependencies are opaque and it’s hard to apply local reasoning. For some CSS that’s what you want, but for a lot of use cases you want very specific rules coupled to very specific DOM. When I have that kind of relationship I want to control the blast radius and not let it leak out to the rest of the app. I also want co-location with the thing that’s making the relevant DOM.

I also do think CSS is hard to learn because of how vast it is with the decades of shit piled on. There’s no clear way to do a lot of things, and if I have a solution, there’s always this doubt that I’m holding it wrong and fucking over future me.

People that know CSS tend to hate things like tailwind and css-in-js because it’s an absolute abuse of the core design principles of “correct” CSS. But these things succeed for not 100% bad reasons.