News for hackers. Stuff that matters.
Re:CSS-In-JS and Static Rendering by Chyzwar on Sunday February 03, 2019 @10:42AM (#19070155)
You used a framework that specifically uses CSS in JS and tried to use it as a server-side rendered website.

There is plenty of react frameworks that are geared toward traditional CSS: reactstrap, semantic-ui-react and ant design. Not to mentions that you could have used any css framework.

Re:CSS-In-JS and Static Rendering by LeonM on Sunday February 03, 2019 @01:07PM (#19071140)
> You used a framework that specifically uses CSS in JS and tried to use it as a server-side rendered website.

No, I DONT want server side rendering. That's the whole point. I want an application that renders client side, but without the dynamic CSS injection that breaks CSP.

The only current solution that is being offered [1] would be using server-side rendering to inject CSP nonces into your client-side rendered app... it's madness.

It should be possible to compile the CSS-in-JSS into a .css file and serve that css file statically.

[1] https://github.com/cssinjs/jss/blob/master/docs/csp.md