[csswg-drafts] [css-animations-2] Review of animation-trigger/etc text (#13010)

tabatkins has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-animations-2] Review of animation-trigger/etc text ==
Hey all, in a breakout session at the Paris f2f earlier this year we settled a lot of lingering questions about the proposed `animation-trigger` feature. However, not all impls were in that breakout, and when @fantasai showed up at the end, she had some concerns with the syntax.

I've reflected all the resolutions we took in the breakout into [the Animations 2 spec](https://drafts.csswg.org/css-animations-2/) now, so we can get review in a reasonable manner. (See the 'animation-trigger' property, and the new Triggers section.) You can also view the changes individually, and the associated issues they were addressing, in PR #13009.

We hope to get discussion (and hopefully approval!) of the design we've settled on here in an upcoming telcon.  Briefly, the design is:

* 'animation-trigger' is added as a reset-only sub-property of the 'animation' shorthand. It lists a trigger name, and an action to take when the trigger is activated. (or two, if the trigger can activate in multiple ways)
* Triggers are defined on the triggering element - some element with visibility of the timeline you want to trigger on, or an element you want to respond to events targeting.
* Triggers are global, with a simple name-clash resolution, essentially identical to 'anchor-name'. We anticipate adding a 'trigger-scope' identical to 'anchor-scope'. (We also resolved to shift *timelines* to use this same global+scope model to get everything consistent, rather than the current "define for a subtree and lift it higher with scope".)

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/13010 using your GitHub account


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

Received on Friday, 24 October 2025 02:54:53 UTC