Closed MartinMalinda closed 4 months ago
I'm going with this approach
I think it works well, apart from rem
units still not working well for me in shadow root.. but maybe they are not supposed to.
import styles from "/~/style.scss?inline";
const shadowHost = document.querySelector(".my-app-container");
const shadowRoot = shadowHost?.shadowRoot;
if (shadowRoot) {
(shadowHost as HTMLElement).style.fontSize = "16px";
const styleEl = document.createElement("style");
styleEl.textContent = styles;
shadowRoot.prepend(styleEl);
}
HI, thanks for this great plugin and perhaps sorry for a naive question.
I'm using Vue and together with it I have some scoped styles. They work just fine.
But then I have some global styles, together with normalizr that I want to apply to the shadow root. Ia this possible?
If I just do
In main.ts that affects the entire page, not just the shadow root.. so I'm messing with the main DOM. Is there a better way?
Thanks!