Skip to content
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

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JeanSebTr
Copy link

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

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
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