Re: [WICG/webcomponents] Web components should be able to easily adapt to the host page while maintaining enapsulation (Issue #986)

You've proposed an allow list approach here, but what if there was a block list approach? It would seem that you _might_ be able to achieve that assuming a version [`open-stylable` Shadow Roots proposal](open-stylable Shadow Roots proposal) that allowed appending style for just the shadow root and `!important`. That way you opting out of styles from the host in certain places. `!important` is a bit of concerning API for some, but it seems to be coming back into vogue with the clarity that `@layer` brings to the technique, so maybe it's the a good path here?

An `open-stylable` Shadow Root (so you get `<slot>` and protection from JS selectors, that had default styles at `::slotted()` specificity, but could accept `!important` specificity sounds like it could be pretty interesting.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/WICG/webcomponents/issues/986#issuecomment-1447218820
You are receiving this because you are subscribed to this thread.

Message ID: <WICG/webcomponents/issues/986/1447218820@github.com>

Received on Monday, 27 February 2023 22:36:41 UTC