W3C home > Mailing lists > Public > public-css-archive@w3.org > August 2020

Re: [csswg-drafts] [css-scoping] Handling global name-defining constructs in shadow trees (#1995)

From: Rune Lillesveen via GitHub <sysbot+gh@w3.org>
Date: Wed, 05 Aug 2020 11:34:37 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-669142242-1596627276-sysbot+gh@w3.org>
There is a concern that I couldn't see discussed above, sorry if I've missed it:

Regarding the scoped() syntax, there is not only nested shadow trees which needs to be addressed. If this should be exposed to the author, and round-trip, there also needs to be scoped() references which point to shadow scopes where elements have been slotted into.

Consider this:

```
<my-application>
  <:shadow>
    <my-component>
      <:shadow>
        <style>
          @font-face { font-family: ahem; src: url(x) }
          slot { font-family: ahem }
        </style>
        <slot />
      </:shadow>
      <list>
        <:shadow>
          <style>
            @font-face { font-family: ahem; src: url(y) }
            slot { font-family: ahem }
          </style>
          <slot />
        </:shadow>
        <list-item />
        <list-item />
        <list-item />
      </list>
    </my-component>
  </:shadow>
</my-application>
```

Fonts inherited into `<my-application>` can be reference with scoped(family, int), but how would you reference the font-family inherited from the `<my-component>` into `<list>` as the computed value for `<list>` or for the `<list-item>` inherited from `<list>` via the slot?


-- 
GitHub Notification of comment by lilles
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1995#issuecomment-669142242 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 5 August 2020 11:34:40 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:13 UTC