-
Notifications
You must be signed in to change notification settings - Fork 0
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 not being properly imported when using shadow DOM #6
Comments
Note: This may actually only affect IIFE-based execution which embeds styles in the JS and then tries to attach them to the main document. If compiling using the typical modules, you can still pass the generated CSS as an argument to the |
Probably related to vitejs/vite#11769. Maybe just specific to compiling to |
Reverting title again, since there are actually multiple use cases for this (i.e. missing styles when using the shadow DOM):
This issue could be an opportunity to approach resolving both at the same time. Uncovered when validating both light + shadow DOM fixes for issue #10. Some ideas on resolving:
|
This is currently low priority for me personally (since I do not use the shadow DOM), but welcome a PR to fix this if anyone is interested and has the time. The only reason I think it's still worthwhile to consider supporting shadow DOM is because it brings some important
svelte-retag
specific features to existing capability in Svelte, i.e.🤔 FWIW, it appears that this affects the original fork
svelte-tag
as well. Anyway, see below.Describe the bug
Styles from the component itself work fine in light DOM, but when using shadow DOM (at least in development mode) the CSS styles from the component do not appear to be injected at all into the component.
Reproduction
JavaScript
HTML
Svelte component
Logs
No response
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: