Closed dinfer closed 2 months ago
hi @dinfer not sure what is the question. I guess you want to prevent Tailwind from injecting default styles into the page?
@cezaraugusto I want to use tailwind for the elements created by content script, but I dont want to affect the original styles of that page.
For example, I want to use tailwind to style the panel at right-bottom, but the links of google should remain be blue.
I need a way to make tailwind only affect the elements created by content script
sure, please take a look at my reply in https://github.com/extension-js/extension.js/issues/48#issuecomment-2089148686, I guess adding the content element to the shadow dom will do the trick
@cezaraugusto Thanks, I'm closing this issue
Tailwind resets all the styles in the pages which my content script inject into. I just use the official react-typescript template, and I only change the
content_scripts.matches
to["<all_urls>"]
in themanifest.json
, no code is modified.Is there a way to avoid the "style lack"? It seems WebComponent cannot be used here, cause
customElements
isnull
in the isolated runtime of content script.