Hacker News new | ask | show | jobs
by satvikpendem 40 days ago
CSS modules solve all of these problems.
1 comments

They don't, really. The only thing they solve is side effects, but you'll still want shared conventions across your modules.
If you're using components, it's the same as Tailwind, just put your CSS module files next to the component, or use compile time CSS in TS frameworks like PandaCSS to have them in the code itself. For shared conventions that is the purview of the design system and you'd have CSS tokens for various colors etc. Anything you can do in Tailwind you can of course do in CSS modules because it's CSS at the end of the day.
That isn't just CSS modules, then, but additional tooling on top.
Eh, no, it's using CSS as designed. Variables are in CSS for example. It is not additional tooling at all.