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

Add crossorigin="anonymous" to development css links #126

Merged
merged 2 commits into from
May 14, 2024

Conversation

piotrjoniec
Copy link
Contributor

It's a bit of an edge case, but without crossorigin="anonymous" you can't access the cssRules of stylesheets in dev mode:

image

Copy link

netlify bot commented Apr 22, 2024

Deploy Preview for bespoke-flan-5eacfc ready!

Name Link
🔨 Latest commit d8ade66
🔍 Latest deploy log https://app.netlify.com/sites/bespoke-flan-5eacfc/deploys/66409bf7db2d630008f65aed
😎 Deploy Preview https://deploy-preview-126--bespoke-flan-5eacfc.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@tuanpham-barrel
Copy link
Collaborator

Hi @piotrjoniec - What's the version of plugin are you using?

@piotrjoniec
Copy link
Contributor Author

Hi @tuanpham-barrel, I tested this on version 3.0.1.

@wturnerharris
Copy link
Member

@piotrjoniec - can you share a little bit more about how you're using that property in your work? Definitely a little edge-case, but we can replicate and think there's value in adding this in for better DX.

@piotrjoniec
Copy link
Contributor Author

@wturnerharris I'm using Lit components in my project, and for the ones using the Shadow DOM I still want to include the global styles within them. So, I use the cssRules property on the global stylesheet to build a new CSSStyleSheet object that can be used by these components.

@montalvomiguelo montalvomiguelo self-requested a review May 10, 2024 10:12
@montalvomiguelo
Copy link
Collaborator

@piotrjoniec Thanks for your contribution! It looks like the tests aren't passing with your changes. Could you please update them? Let me know if you need any help!

@piotrjoniec
Copy link
Contributor Author

@montalvomiguelo I've updated the test snapshot, it should be all good now.

@montalvomiguelo montalvomiguelo merged commit 0490dc4 into barrel:main May 14, 2024
11 checks passed
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.

None yet

4 participants