3 ms·
checkout css-modules! https://github.com/css-modules/css-modules https://github.com/css-modules/css-modules
by devdoomari 10y ago
checkout css-modules!
https://github.com/css-modules/css-modules https://github.com/css-modules/css-modules
- nkkollaw 10y agoNice. I've tried a few solutions to add styles to React components but they all had something that didn't make them see as the perfect solution. This looks very good, I've never tried it before. Thanks.
- boubiyeah 10y agoYep, happily using css modules too. The only tiny issue left with that approach is that you still can't share code (for instance, colors) between JS & CSS. but overall, I think it's the best compromise today.
- TheAceOfHearts 10y agoLook at css-module-values [0]. It's not perfect, but it lets you share values between JS and CSS. All values in the file are visible on the imported module. [0] https://github.com/css-modules/postcss-modules-values https://github.com/css-modules/postcss-modules-values
- boubiyeah 10y agoThanks, looks handy!