getStyle doesn't work
I have
content.ts
:
In practice, the iframe will be injected, but the styling won't apply25 Replies
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
The styling won't apply because Plasmo creates a Shadow DOM, which isolates the web page's style from the component's styling. The Shadow DOM prevents the web page's style from affecting the component's styling and vice-versa.
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
I don't think my content script is complex enough to justify a CSUI
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
It's merely injecting an iframe whose only dynamic thing is the src
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
You mean, with
.style.cssText
? It seems like a waste of computational powerUnknown User•2y ago
Message Not Public
Sign In & Join Server To View
I'd rather have an external CSS file that runs on the page
Can you remind me how to add such a file?
Like where do I put it
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Import the stylesheet twice and use the IDs
#plasmo-mount-container
and #plasmo-shadow-container
to alter the Root Container
styles in your CSS.Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
lmfao
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View