Re: [csswg-drafts] [css-anchor] anchor-name should not leak out of a shadow tree (#7916)

So, my point about container queries is that the container queries spec is not making container-name a tree scoped name which means the text below is red (in both Safari and Chrome - I've checked Safari by using a non-declarative shadow dom):

```html
<!doctype html>
<style>
  #slotted {
    width: 200px;
    container-type: inline-size;
  }
  @container shadow (width = 200px) {
    span { color: red; }
  }
</style>
<div id="host">
  <template shadowroot="open">
    <style>
      ::slotted(#slotted) {
        container-name: shadow;
      }
    </style>
    <slot></slot>
  </template>
  <div id="slotted">
    <span>Red?</span>
  </div>
</div>
```

I guess this can be seen as a leak and an argument that container-name should be a tree-scoped name.

My point is that anchor-name and container-name are so similar they should behave the same?


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


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

Received on Monday, 24 October 2022 17:09:58 UTC