Re: [WICG/webcomponents] "open-stylable" Shadow Roots (#909)

> I did find a way to inject Bootstrap CSS in every shadow-DOM component […], but I could not find a way to make the Bootstrap Javascript code work with shadow DOM components so I just gave up.

This is a good example of why it's important to tease apart two things:

1. "I can't use shadow DOM because I need to apply global styling."
2. "I can't use shadow DOM because a JS library assumes it can use `querySelectorAll()` to traverse the whole DOM."

Open-stylable shadow roots would solve # 1 but not # 2. And in this case, # 2 was the actual problem.

It would also be interesting to know how often frameworks like Bootstrap, Bulma, etc. contain descendant selectors (which can't straddle shadow boundaries), and whether that's a big problem in practice when using shadow DOM.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/WICG/webcomponents/issues/909#issuecomment-1212207372

You are receiving this because you are subscribed to this thread.

Message ID: <WICG/webcomponents/issues/909/1212207372@github.com>

Received on Thursday, 11 August 2022 16:21:37 UTC