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

@DarkWiiPlayer, @matthewp:

I hope it is clear that the [shadow layers proposal](https://github.com/WICG/webcomponents/issues/909#issuecomment-1993388146) is not proposing to put an attribute ala `shadowlayers="inherit.reset"` on a template tag.  

Whether the template is part of an attachShadow() javascript web component initialization approach or more importantly is part of a [declarative shadow DOM](https://developer.chrome.com/docs/css-ui/declarative-shadow-dom) (it is [not polyfillable](https://github.com/WICG/webcomponents/issues/909#issuecomment-1996186693) among other reasons).

The proposal treats both an attribute wherever placed and a potential attachShadow() option as just a [convenience](https://github.com/WICG/webcomponents/issues/909#issuecomment-1996186693) (and speculative coordination enhancement), not a [requirement](https://github.com/WICG/webcomponents/issues/909#issuecomment-2000272076).

As to syntaxes, my preference is [neither](https://github.com/WICG/webcomponents/issues/909#issuecomment-1998305361) an attribute nor an attachShdow() option and just put directly inside a shadow tree:

```css
@layer inherit.reset;
```

To me that is intuitive, supports declarative shadow trees, provides [opt-in protection](https://github.com/WICG/webcomponents/issues/909#issuecomment-1996194974) for web component authors who need it, avoids the need for a new mode or attribute, and [avoids FOUC](https://github.com/WICG/webcomponents/issues/909#issuecomment-1997987689).

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

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

Received on Monday, 18 March 2024 18:33:32 UTC