threepointone / glamor

inline css for react et al
MIT License
3.66k stars 199 forks source link

Allows setting nonce on generated style tags #376

Open swaff opened 6 years ago

swaff commented 6 years ago

Uses a feature of webpack to extract a set nonce value on the generated style tags to allow users to maintain a Content Security Policy that does not need to use unsafe-inline for the styles.

Updates the makeStyleTag function to optionally add the nonce attribute if the __webpack_nonce__ value is set.

Adds documentation of the feature at docs/nonce.md

frontendphil commented 6 years ago

@threepointone since this is pretty crucial for us, how can we help speed up getting this merged? In general, I see quite some useful PRs in the repo, that are stalling.

frontendphil commented 6 years ago

Hey @swaff, since we at Signavio believe in this library we want to continue developing it further. Therefore, we've forked it and will release it as signavio-glamor. It would be awesome if you could direct your PR against our fork so that we can include it!

https://github.com/signavio/glamor

swaff commented 6 years ago

@frontendphil That is done for you now, good luck with the project.