Closed marekdedic closed 8 months ago
Thanks!
Hi, sorry to bother, but could you please release this change? Thanks!
@marekdedic I apologize for taking so long to reply to you.
I noticed that making this change would cause the package to lose one of its features, "No CSS file required."
Can we use a solution similar to ".style.background = 'red';" to solve the CSP issue?
Hi, what do you mean by that? You can still use this package without a separate CSS file (CSP won't work for you then, but that's kind of the point of it :D). I re-configured the docs to extract the CSS here, but the users don't have to do this (they can decide)...
The solution similar to https://stackoverflow.com/a/57633533. Which you mentioned in this comment, does not require extracting the CSS. Extracting CSS files requires users to have additional build configurations to load these CSS files.
The current solution also doesn't require extracting the CSS - it's up to the user. If they want to keep the CSS as part of the JS, they can (they won't be able to have strict CSP, but that's kind of the point of strict CSP...).
Sure, I think we can release this together with this PR. It will be a BREAKING CHANGE.
Released with v4. Thanks!
I've made it so no inline styles will be produced, unless you add a
<Fa style="...">
property - then you can't really be helped :DAdditionally, I've made it so the docs extract their CSS into a separate file, I mainly did it because I used the docs to test the thing (and you need CSS in
<head>
or a separate file to not trigger CSP), but it should improve performance, so I left it in the PR...