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

> To me, the key open question that needs to be answered is whether selective adoption of document-level stylesheets is necessary or not. That is, should a component or users of the component need to be able to filter (i.e. selectively apply) which stylesheet or style rules apply to its shadow tree.
> 
> I agree and would frame this in terms of the use case of backwards compatibility with existing light DOM: Did the light DOM "components" also have this need? And if so, how did they achieve it?

I think the short answer yes, and they didn't solve, they just cope. 

It, selectively applying CSS from multiple sources, is a pretty much universal and perennial need for all web authors. You can't solve it by repealing the cascade or mandating encapsulation, so the standard toolkit is specificity wars, races and hacks, specificity-skirting CSS frameworks, and on and on.

Cascade layers is a welcome step forward, and its well-considered priority system works for [frameworks](https://github.com/w3c/csswg-drafts/issues/6284#issuecomment-1006946621) that want to be at low priority. But a plain DOM componenty thing that wants high priority is different.

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

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

Received on Thursday, 14 March 2024 22:35:26 UTC