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

An alternative idea, what if `@layer` could be used here, and you could adopt a layer from a global stylesheet.

__global.css__

```css
@layer page {
  a { .... }
}
```

__index.html__

```html
<host-element>
  <template shadowrootmode="open">
    <style>
      @import layer(page);
    <style>
    <a href="/somewhere">Link</a>
  </template>
</host-element>
```

Note that I don't know if this would work or if the syntax works or if there's another option, just trying to convey the general idea.

Key here is that adoption / importing / whatever must be render-blocking to avoid a FOUC. This is the same reason JS solutions don't work.

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

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

Received on Wednesday, 27 December 2023 20:05:52 UTC