Hacker News new | ask | show | jobs
by drenvuk 1695 days ago
Tried it for a week, didn't like it. Utility classes vs compile time css in js + styled components are better in every way when you actually know css.

>But, preventing global CSS removes the expressive power of the “cascading” part of Cascading Style Sheets (CSS).

lol wat? variables exist and import exists if you wanted to stick with style.module.css. StyledComponents works very nicely for this as well.

    <div class='text-base font-sans font-medium rounded-lg bg-gray-100 text-black py-3 text-center cursor-pointer'>Button</div>
The above line of markup looks like utter crap tbh, not to mention, the fact that it's a div vs the name of what you consider it to be in the context of the other objects on the page seems like you're obfuscating its role. I just don't think it's a good thing to use unless you're doing a bunch of one offs that you'll never have to support.

Maybe one week isn't long enough. I dunno.