3 ms·
I know not everyone is using react and webpack, but using CSS modules has made CSS incredibly easy and removes the pitfalls that most large projects fall into.
by crucio 10y ago
I know not everyone is using react and webpack, but using CSS modules has made CSS incredibly easy and removes the pitfalls that most large projects fall into.
With CSS modules you don't have to think about whether you're being too specific or whether your styles will have side effects, because all of your CSS is locally scoped to just the component you're working with.
https://github.com/css-modules/css-modules https://github.com/css-modules/css-modules
- pygy_ 10y agohttp://j2c.py.gy http://j2c.py.gy provides similar avantages from JS. You get the full CSS feature set (at-rules, pseudo-selectors) unlike with inline styles, and local class names. No need for WebPack since it's plain JS. Disclaimer: I wrote it :-)