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

Shadow tree inheriting from parent #123

Open
rrs94 opened this issue Oct 28, 2021 · 2 comments
Open

Shadow tree inheriting from parent #123

rrs94 opened this issue Oct 28, 2021 · 2 comments

Comments

@rrs94
Copy link

rrs94 commented Oct 28, 2021

Hi, I'm trying to test out this library but I'm having issues with getting the expected behavior to work, I modified the example:
https://codesandbox.io/s/react-shadow-forked-4717v?file=/src/index.js:454-459

So that the parent of the shadow host has a "color: red" style applied to it, and this style is being inherited by the elements inside the shadow tree even this is not supposed to happen. Am I doing something wrong or perhaps I misunderstood the functionality of shadow dom? Thanks!

@lancesnider
Copy link

I'm having the same issue.

Screen-Shot-2022-03-17-at-1 01 42-PM

@lancesnider
Copy link

Okay, found the answer 2 seconds after posting this. :) Here's the relevant thread: #68

Turns out there are still some styles that bleed through the shadow boundary. I got around this by adding all: initial; to the top-level class.

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