- From: Matthew Phillips <notifications@github.com>
- Date: Wed, 27 Dec 2023 12:05:46 -0800
- To: WICG/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Wednesday, 27 December 2023 20:05:52 UTC
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