- From: Ryosuke Niwa <notifications@github.com>
- Date: Fri, 12 Jan 2024 14:53:44 -0800
- To: WICG/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Friday, 12 January 2024 22:53:50 UTC
It's clear to me that we must support selective sharing of CSS rules. Otherwise, people will inevitably ask for ways to filter out shadow roots / host amongst shared style rules next if we just provide a way to either share all styles or none. Conceptually, this problem of sharing styles across multiple components seems very similar to the problem of sharing a custom element registry across multiple components. Yet for scoped custom registers, we're not envisioning to have a single boolean flag to indicate whether a scoped custom element registry is shared with its parent tree or not because such an API would be too limiting. I think a similar argument can be made for sharing styles as well. Heck, the argument for selective style sharing might be stronger for styles due to the whole cascading & specificity fiasco. So thinking out loud, I wonder if an alternative solution / API shape here is to make style scope an actual object and make it possible to share it across shadow trees like we do envision with a scoped custom element registry. That will provide some standard API for component authors & users to coordinate style sharing. -- Reply to this email directly or view it on GitHub: https://github.com/WICG/webcomponents/issues/909#issuecomment-1890086048 You are receiving this because you are subscribed to this thread. Message ID: <WICG/webcomponents/issues/909/1890086048@github.com>
Received on Friday, 12 January 2024 22:53:50 UTC