Re: [w3c/webcomponents] Theming options for shadow roots (#864)

> I think lexical names, while useful (the linked proposal is from me), is quite a large lift for this feature.

I don't know how browser stylesheet internals work but it should be no harder than `@namespace` even including importing them.

The implementation would basically be treat `@import './foo.js' { $bar; }` as "replace all `$bar` tokens with `https://resolved.url/path/to/foo.js#bar`".

It'd be pseudo like if it was written as:

```css
::theme(https://resolved.url/path/to/foo.js#bar) {
  color: blue;
}
```

```js
element.parts.add(new URL('https://resolved.url/path/to/foo.js#bar'));
```

This would just then follow the processing model of `::theme(simple-name)` as has been proposed in the past.

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

Received on Tuesday, 28 January 2020 03:33:03 UTC