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

@tabatkins By ancestor search, do you mean looking up ancestors in the light tree without walking past shadow roots?

If so, it means host-child will never match any containers inside host's shadow tree:

```html
<style>
  @container name (min-width: 100px) { host-child {} }
  @container (min-width: 100px) { host-child {} }
</style>
<host-element><host-child></host-child></host-element>
```

What about slotted rules inside a shadow tree:

```html
<style>
  @container name (min-width: 100px) { ::slotted(div) {} }
  @container (min-width: 100px) { ::slotted(div) {} }
</style>
<div>
  <slot></slot>
</div>
```

Do we start walking from the slot instead of the slotted element to find the container so that it's possible to match containers inside the shadow tree?


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


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

Received on Thursday, 11 November 2021 10:24:00 UTC