@AmeliaBR that's one of the weird things: the clone lives within the light DOM, not the shadow DOM. It has to to allow full styling.
Top-level
@AmeliaBR that's one of the weird things: the clone lives within the light DOM, not the shadow DOM. It has to to allow full styling. 6 comments
@AmeliaBR I agree it's really weird. The only similar thing I can think of is contenteditable, but that's pretty different. But yeah, styling arbitrary shadow content is harrrrd. @AmeliaBR @jaffathecake doesn’t count as content – closest I can think of is tbody ``` |
@jaffathecake That is really weird & problematic, IMO. Is there any other case where the browser dynamically injects content in the light DOM?
Are styling hooks for shadow DOM still so bad that can't be adjusted?
Alternatively, again borrowing from SVG convention: The cloned element within a <use> brings with it style rules from its original context. For the selectedoption use case, you could then add a pseudoclass or host rule that matches the original element only in the cloned context.