- From: andruud via GitHub <sysbot+gh@w3.org>
- Date: Thu, 04 Jul 2024 09:42:38 +0000
- To: public-css-archive@w3.org
This should be well defined now. Only anchor queries from within the flat-tree subtree of `#scoper` can "see" `--anchor`. So it's not visible in the outer scope, except when the query comes from another ::part(), e.g.:
```html
<style>
my-element::part(anchor) {
  anchor-name: --anchor;
}
my-element::part(anchored) {
  left: anchor(--anchor right);
}
</style>
<my-element>
  <template shadowrootmode="open">
    <div id="scoper" style="anchor-scope: all">
       <div id="anchor" part="anchor"></div>
       <div id="anchored" part="anchor"></div> <!-- Works -->
    </div>
   <!-- But not if part=anchor was here instead. -->
  </template>
</my-element>
<!-- And certainly not from here. -->
```
(And also a similar case with a slotted element).
In the inner scope, `--anchor` is visible inside `#scoper`, but not outside it.
-- 
GitHub Notification of comment by andruud
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10525#issuecomment-2208553167 using your GitHub account
-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 4 July 2024 09:42:39 UTC