Shadow tree inheriting from parent
rrs94 opened this issue · 2 comments
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!
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.