Re: [csswg-drafts] [css-contain] CQ vs shadow boundaries (#5984)

With container-name it gets even more interesting.

Should container-name be tree-scoped names?

In the example below, using tree-scoped names would mean that the container rules for host-child below would match differerent containers based on the scope of the rule:

```html
<!doctype html>
<style>
  host-element {
    container-type: inline-size;
    container-name: a;
  }
  @container a (width <= 300px) {
    host-child {}
  }
</style>
<host-element>
  <template shadowroot="open">
    <style>
      inner-container {
        container-type: inline-size;
        container-name: a;
      }
      @container a (width <= 200px) {
        ::slotted(host-child) {}
      }
    </style>
    <inner-container>
      <slot></slot>
    </inner-container>
  </template>
  <host-child>Light content</host-child>
</host-element>
```


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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Monday, 8 November 2021 13:54:09 UTC