Re: [csswg-drafts] [css-animations-2][web-animations-2] How should AnimationTrigger work? (#12119)

The CSS Working Group just discussed `[css-animations-2][web-animations-2] How should AnimationTrigger work?`, and agreed to the following:

* `RESOLVED: Triggers are an external controller of the animation`

<details><summary>The full IRC log of that discussion</summary>
&lt;kbabbitt> DavidA: we're trying to add for scroll triggered animations to the spec<br>
&lt;kbabbitt> ... adding concept of animation trigger<br>
&lt;kbabbitt> ... idea is basically for scroll triggered animations you specify parameters related to scrolling<br>
&lt;kbabbitt> ... that will kick off the animation at a certain scroll point<br>
&lt;kbabbitt> ... there's an underlyinga nimation trigger object<br>
&lt;kbabbitt> ... that we're trying to figure out how that object should behavior<br>
&lt;kbabbitt> ... in relation to the animation<br>
&lt;kbabbitt> ... 2 models we're thinking about<br>
&lt;kbabbitt> ... trigger as inline mechanism<br>
&lt;kbabbitt> ... redefine ? animation as basically arming that trigger<br>
&lt;kbabbitt> ... so that when specified conditions are met it starts<br>
&lt;kbabbitt> ... other model is this external model where animation trigger is separate thing<br>
&lt;kbabbitt> ... bsaed on conditions that have been specified, it calls play on the animation etc<br>
&lt;kbabbitt> ... having discussion about that<br>
&lt;kbabbitt> ... would like to get a resolution<br>
&lt;kbabbitt> ... what we agreed on is to take the external model path<br>
&lt;kbabbitt> ... where an animation trigger calls play based on conditions that have been set on trigger<br>
&lt;kbabbitt> ... would like to get a resolution on that particular path<br>
&lt;kbabbitt> ... also posted in issue with proposal, other details<br>
&lt;kbabbitt> ... would like resolution on path to choose for animation trigger object<br>
&lt;kbabbitt> ... would also like resolution on the APIs we created to explicitly attach animations to triggers<br>
&lt;kbabbitt> ... with external model we need an explicit way to say trigger ?? animation<br>
&lt;kbabbitt> ... other way we need to define ... animations get triggers by default<br>
&lt;kbabbitt> ... with external model we're pursuing, we thing animationtrigger.addanimation / removeanimation would be the way to go<br>
&lt;kbabbitt> flackr: Brian Birtles is happy with external trigger approach<br>
&lt;kbabbitt> ... among spec authors we're happy with this design<br>
&lt;kbabbitt> Rossen6: others?<br>
&lt;Rossen6> a?<br>
&lt;Rossen6> q?<br>
&lt;TabAtkins> Sounds reasonable to me.<br>
&lt;ydaniv> q+<br>
&lt;kbabbitt> ydaniv: also in favor of this model<br>
&lt;kbabbitt> ... some reservation regarding other things<br>
&lt;kbabbitt> ... from brian's suggestions, comments in issue, but better to discuss separately<br>
&lt;kbabbitt> Rossen6: objections:<br>
&lt;kbabbitt> ?<br>
&lt;Rossen6> ack ydaniv<br>
&lt;flackr> Proposed resolution: Triggers are an external controller of the animation<br>
&lt;kbabbitt> RESOLVED: Triggers are an external controller of the animation<br>
&lt;flackr> Proposed resolution: AnimationTrigger.add/removeAnimation adds and removes animations from the trigger<br>
&lt;kbabbitt> Rossen6: objections?<br>
&lt;kbabbitt> ydaniv: had some reservation regarding multiple triggers for single animation<br>
&lt;kbabbitt> ... I think we need to see whether this works or makes things complicated<br>
&lt;kbabbitt> ... the way I see, we need something that says, how is this triggered<br>
&lt;kbabbitt> ... how is state evaluated together<br>
&lt;kbabbitt> ... is it AND or OR<br>
&lt;kbabbitt> ... and simply allowing multiple triggers per animation is maybe less useful or less ergonomic in many cases<br>
&lt;kbabbitt> ... so I would rather we also consider having a single trigger for animation<br>
&lt;kbabbitt> ... same trigger for many animations is already fine<br>
&lt;kbabbitt> Rossen6: suggest for second resolution, let's work it out in GitHub issue and we'll take it back up later<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12119#issuecomment-2985057242 using your GitHub account


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

Received on Wednesday, 18 June 2025 17:02:48 UTC