Skip to content

[css-animations-2] Define trigger scope#13241

Merged
tabatkins merged 4 commits into
w3c:mainfrom
DavMila:trigger-scope
Dec 19, 2025
Merged

[css-animations-2] Define trigger scope#13241
tabatkins merged 4 commits into
w3c:mainfrom
DavMila:trigger-scope

Conversation

@DavMila
Copy link
Copy Markdown
Contributor

@DavMila DavMila commented Dec 18, 2025

We resolved to have a name scoping property for animation triggers and have it behave like anchor-scope.

@DavMila DavMila requested review from flackr and tabatkins December 18, 2025 16:16
@DavMila DavMila changed the title Define trigger-scope [css-animations-2] Define trigger scope Dec 18, 2025
Comment thread css-animations-2/Overview.bs Outdated
Comment thread css-animations-2/Overview.bs Outdated
Comment thread css-animations-2/Overview.bs Outdated
Comment thread css-animations-2/Overview.bs Outdated
Comment thread css-animations-2/Overview.bs Outdated
This property scopes [=trigger names=] to the subtree of the matching element.

The values have same meaning as with the [[css-anchor-position-1#anchor-scope|anchor-scope]]
property. Thus, the following description of their meaning is similar to the anchor-scope text:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this line can be removed.

Comment thread css-animations-2/Overview.bs Outdated

All [=trigger names=] are document-global by default,
similar to <l spec="css-anchor-position-1">[=anchor names=]</l>, but may be
scoped by [[#trigger-scope| trigger-scope]].
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is confusing, anchor names can also be scoped. I think simplest would be to just remove it. If there is any cross referencing, I could see the anchor scope spec calling out how unlike timeline-scope and trigger-scope it has additional restrictions.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. I kept the "document-global" part as I don't think that's called out elsewhere... or is that covered by the "tree-scoped" references?

@DavMila DavMila requested review from flackr and vmpstr December 18, 2025 19:42
Comment thread css-animations-2/Overview.bs Outdated
Combine some sections and reword a few bits.
@tabatkins tabatkins merged commit 8d80329 into w3c:main Dec 19, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants