- From: Robert Flack via GitHub <noreply@w3.org>
- Date: Fri, 16 Jan 2026 19:54:13 +0000
- To: public-css-archive@w3.org
flackr has just created a new issue for https://github.com/w3c/csswg-drafts:
== [css-anchor-position-1][css-animations-2][scroll-animations-1] Fix name visibility for descendants ==
In https://github.com/w3c/csswg-drafts/issues/12581#issuecomment-3206707173 we resolved to use the same name scoping mechanism for the various specs that have scoped names: [timeline-scope](https://www.w3.org/TR/scroll-animations-1/#timeline-scope), [anchor-scope](https://www.w3.org/TR/css-anchor-position-1/#anchor-scope), and [trigger-scope](https://drafts.csswg.org/css-animations-2/#trigger-scope). I still think this is a good thing to do so that developers don't have to navigate nuanced differences between name scoping.
Proposal:
Make all of the `-scope` properties refer to the nearest ancestor declaring that name if found before reaching the scoping element.
I think this is one aspect of timeline scopes that we should adopt for anchor scopes and trigger scopes. It is confusing for developers to have to add an explicit scope when referring to an ancestor. E.g.
```html
<style>
.item {
view-timeline-name: --item;
}
.animation-target {
animation-name: parallax;
animation-timeline: --item;
}
</style>
<div class=item>
<div class=animation-target></div>
</div>
<div class=item>
<div class=animation-target></div>
</div>
<div class=item>
<div class=animation-target></div>
</div>
```
This will significantly de-risk the potential compat issues of updating `timeline-scope` as well as make `anchor-scope` and `trigger-scope` easier to use. E.g. here's a demo where the anchor intends to use the nearest position-anchor but right now requires developers explicitly add anchor-scope: https://codepen.io/flackr/pen/azZJvyL
@andruud FYI
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/13364 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Friday, 16 January 2026 19:54:14 UTC