Skip to content

Fix CSP issues by using CSSOM to reset styles when possible#4100

Open
JeanSebTr wants to merge 1 commit into
kenwheeler:masterfrom
JeanSebTr:csp-fix
Open

Fix CSP issues by using CSSOM to reset styles when possible#4100
JeanSebTr wants to merge 1 commit into
kenwheeler:masterfrom
JeanSebTr:csp-fix

Conversation

@JeanSebTr

Copy link
Copy Markdown

This fix Content-Security-Policy issues for the most common cases (see #2399 and #3799).

That most common case being using slick without having the style attribute set on individual carousel items so that the reset of slick can remove all CSS props using the CSSOM APIs.

I'm not sure if test cases can be added for this.

This allows to comply with CSP lacking the unsafe-inline style policy.
@kamodulin

Copy link
Copy Markdown

Hi @JeanSebTr! I wanted to do this on my end since I don't know how long it will be before this is merged. I was just wondering if I only have to modify slick.js or do I also have to change slick.min.js? Thank you!

@JeanSebTr

Copy link
Copy Markdown
Author

Hi @kamodulin ! It depends on how you're importing slick into your project. If you use slick.min.js, you'll have to build it and honestly, I did not manage to do so. I instead used Accessible360/accessible-slick which has a more modern build process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants