-
-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Usage of the style
attribute breaks websites with a secure Content Security Policy
#35
Comments
@nicwortel thanks for bringing this to my attention. I'm trying to avoid a stylesheet dependency if at all possible but I will look at other options. |
@nicwortel do you have any suggestions for styling these elements in a way that doesn't involve moving them to an external stylesheet and that would still be compliant? My concern is that separating styles into their own resource will introduce a breaking change and require additional setup. One potential workaround would be to instead put all of the styles into a Edit: I'm noticing that Bootstrap 5 uses inline |
Would it be possible to only use Bootstrap classes to style? Since the users of this will already have the Bootstrap 5 stylesheet, it won't introduce any extra set up. |
@CallumNZ I could replace some of the inline styles with utility classes now (e.g. That said, Bootstrap applies the |
Similar to #12, the use of inline
style
attributes breaks Content Security Policies without the (insecure) settingstyle: unsafe-inline
.Instead of using
style
attributes, styling should probably be supplied via classes.In total I count 7 instances of the
style
attribute inindex.js
, for example:bs5-lightbox/src/index.js
Lines 149 to 153 in f4d2e1b
The text was updated successfully, but these errors were encountered: