Expected: the shadow text is brown, serif, 20px, italic, letter-spaced, double-leaded and right-aligned — all inherited from the host's document styles. It does not get the border, yellow background or padding, because those are not inherited properties.
Expected: both lines in the first box are purple. The slotted text's
parent in the flattened tree is the <slot> — which sits
inside the purple wrapper — so it inherits purple, not the green of its
light-DOM parent. Selector matching uses the light DOM, but inheritance does
not.
Expected: in this second box the shadow tree sets no colour, so the chain
runs slot → shadow root → host → .green-scope and
both lines come out green.
inherit pulls a non-inherited value throughExpected: the inner box picks up the host's dashed border because it asks
for it explicitly with border: inherit.