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
Styles are not applied correctly for elements using shadow DOM. #7118
Comments
There's a related issue here although I'm not sure it's still relevant. |
That issue is basically the opposite problem since This issue is much more significant as it affects all styles. Getting rid of users having to manually import stylesheets was a breaking change when using a calendar inside a shadow DOM. Before it was possible to just import the styles and include them in the right spot manually. I would hope this would be an easy fix to just append the styles to |
Thanks for the details. As a workaround for now, you could copy the styles from the DOM like this: |
Queued for release: 1dfc957 |
@arshaw But aren't the styles applied to both main document and shadow DOM in your codepen? |
@SimmeNilsson I'd need to investigate further. Can you please create a new ticket? |
@arshaw Thanks! Created a new one. |
Reduced Test Case
https://codepen.io/bramkragten/pen/GRBqxvQ
Do you understand that if a reduced test case is not provided, we will intentionally delay triaging of your ticket?
Which connector are you using (React/Angular/etc)?
No connector (vanilla JS)
Bug Description
The styles are added to the global documents head, these styles will not apply to shadow dom's. So if a fullcalendar instance is used inside a shadow dom, it will miss the required styles.
Solution
Introduce a new option,
root
:root?: Document | ShadowRoot
If the view is going to be mounted in a shadow root or document other than the one held by the global variable document (the default), you should pass it here.
If
root
is provided, add the styles to that root instead of the global document.The text was updated successfully, but these errors were encountered: