News for hackers. Stuff that matters.
Re:Svelte – A UI framework that compiles into tiny standalon... by devdoomari on Wednesday November 30, 2016 @08:38AM (#13070516)
Re:Svelte – A UI framework that compiles into tiny standalon... by boubiyeah on Wednesday November 30, 2016 @09:09AM (#13070778)
Yep, 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.

Re:Svelte – A UI framework that compiles into tiny standalon... by TheAceOfHearts on Wednesday November 30, 2016 @08:45PM (#13076442)
Look 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

Re:Svelte – A UI framework that compiles into tiny standalon... by boubiyeah on Thursday December 01, 2016 @04:46AM (#13078317)
Thanks, looks handy!
Re:Svelte – A UI framework that compiles into tiny standalon... by nkkollaw on Wednesday November 30, 2016 @08:50AM (#13070610)
Nice.

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.