News for hackers. Stuff that matters.
Re:Show HN: Polished – A lightweight toolset for writing sty... by debaserab2 on Tuesday March 28, 2017 @05:44PM (#13980998)
What is the advantage of bringing your styling into javascript to do that?

I do the exact same thing (I don't use BEM either) by isolating specific component styling to it's own SASS file.

Re:Show HN: Polished – A lightweight toolset for writing sty... by mistersys on Wednesday March 29, 2017 @09:11PM (#13992095)
The parent post as more about component based styling then css-in-js.

As for css-in-js, there isn't much of an advantage to using it vs importing sass files as scoped.

With Sass you get:

- Familiare Syntax

- Avoids inline styles

- All benefits of the Sass community

vs with css-in-js you primarily gain:

- Dynamic and regular styles together

- One less compiler dependency

- Benefits of full JS for style generation

So I think this really depends on the project and your preference, I don't think there's a massive benefit either way.

Re:Show HN: Polished – A lightweight toolset for writing sty... by ryanar on Wednesday March 29, 2017 @12:19AM (#13983361)
Can I see how you setup webpack to parse individual sass files imported into components?