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

Printing from inside of the custom WebComponent with Shadow DOM attached missing Shadow DOM stored styles #770

Open
nikita-kliushnikov-idt opened this issue Dec 6, 2024 · 0 comments

Comments

@nikita-kliushnikov-idt
Copy link

It may happen that you render your app as a custom WebComponent and use Shadow DOM (attach your styles in Shadow DOM for isolation purposes).
Printing using react-to-print from the inside of such custom WebComponent results in styles (ones stored in Shadow DOM) missing.

It would be great to traverse styles from the contentRef up to the document using getRootNode() (polyfill may be needed) instead of simple selecting styles on the document level.

@nikita-kliushnikov-idt nikita-kliushnikov-idt changed the title Printing from inside of the custom WebComponent with shadow DOM attached missing styles Printing from inside of the custom WebComponent with Shadow DOM attached missing Shadow DOM stored styles Dec 6, 2024
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

No branches or pull requests

1 participant