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

Is there a method to avoid style lack? #118

Open
dinfer opened this issue Jun 28, 2024 · 2 comments
Open

Is there a method to avoid style lack? #118

dinfer opened this issue Jun 28, 2024 · 2 comments

Comments

@dinfer
Copy link

dinfer commented Jun 28, 2024

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 the manifest.json, no code is modified.

Is there a way to avoid the "style lack"? It seems WebComponent cannot be used here, cause customElements is null in the isolated runtime of content script.

image
@cezaraugusto
Copy link
Member

hi @dinfer not sure what is the question. I guess you want to prevent Tailwind from injecting default styles into the page?

@dinfer
Copy link
Author

dinfer commented Jun 29, 2024

@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

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