Tailwind CSS from parent page leaking into CSUI #660
Replies: 3 comments 5 replies
-
This is the case with tailwind since it consumes the same style. Simply add a namespace to your tw config |
Beta Was this translation helpful? Give feedback.
-
The only way I've been able to work around this so far is to explicitly set all the properties back on my components top-level element like this:
For some reason, I wasn't even able to set these rules in the
The above would not set any text color to red. Instead, the extension would still inherit the parent pages styles. I did some additional exploration of setting |
Beta Was this translation helpful? Give feedback.
-
I think this will be my final update - after much poking around, I realized the problem was in the fact that Tailwind uses I weighed my options of putting everything in an iFrame but instead decided to convert all of Tailwind's classes to static There's a pretty good thread on ways to automate this using postcss. |
Beta Was this translation helpful? Give feedback.
-
What happened?
When building a basic CSUI (with Vue), default config - the CSS from the parent page is leaking into the shadow/root component. My understanding is this should not be the default behavior.
Code:
Version
Latest
What OS are you seeing the problem on?
MacOSX
What browsers are you seeing the problem on?
Chrome
Relevant log output
No response
(OPTIONAL) Contribution
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions