- From: vmpstr via GitHub <sysbot+gh@w3.org>
- Date: Thu, 04 Jul 2024 02:34:00 +0000
- To: public-css-archive@w3.org
vmpstr has just created a new issue for https://github.com/w3c/csswg-drafts:
== [css-anchor-position] anchor-scope and part descendant styling ==
[`anchor-scope`](https://www.w3.org/TR/css-anchor-position-1/#anchor-scope) is specified to limit the exposure of anchors to not go above the `anchor-scope` element. However, [`anchor-name`](https://www.w3.org/TR/css-anchor-position-1/#name) are also tree scoped which means that an element that is exposed as a part and given an `anchor-name` that way is scoped to the tree scope of the stylesheet that gives it a name (outside of the shadow dom).
I wanted to clarify what happens if both of these features are in effect:
```html
<style>
my-element::part(anchor) {
anchor-name: --anchor;
}
</style>
<my-element>
<template shadowrootmode="open">
<div id="scoper" style="anchor-scope: all">
<div id="anchor" part="anchor"></div>
</div>
</template>
</my-element>
```
Here the `#scoper` element is scoping all the anchors to its subtree, but `#anchor` is exposed as a part and is styled in the outer tree scope and is given an `anchor-name` there. Is that a valid anchor in the outer (or inner) tree scope?
/cc @andruud @tabatkins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10525 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 02:34:01 UTC