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

nested component doesn't get their <style> append to my ShadowRoot #4

Open
larryval opened this issue Jul 22, 2022 · 2 comments
Open

Comments

@larryval
Copy link

Hello,
first : you made a great Job with this plugin !.

My concern: imagine the 'home' route with its home.vue component, home.vue has its own internal navigation with the <RouterView /> component.
The problem is that all components inside sub-route of home will have their style attached to <head> instead of my shadowRoot.
I specify that I added <style style-provider></<style> to all my *.vue component.

a snippet of my Vue app's main file (Vue V3.2 with TypeScript, Vite 2.9.13)

import allStyle from 'virtual:style-provider?query=*';
...
let targetShadow = document.getElementById(`mytargetApp`);
const shadowRoot = targetShadow.attachShadow({ mode: 'open' });
allStyle(shadowRoot).mount();
...
@aui
Copy link
Contributor

aui commented Jul 26, 2022

Hi, please give me a demo. thanks

@larryval
Copy link
Author

I made a demo app to reproduce the case but without success. I will rearrange the code to reproduce exactly the conditions of my app at my work and I will send it to you as soon as the problem reappears

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

2 participants