Re: [csswg-drafts] [css-animations-2][web-animations-2] How should `animation-play-state` interact with `animation-trigger`? (#12064)

The reason we are applying the before fill phase is because we have an animation that can trigger and animate from the 0% keyframe and the animation wants it to animate from the value it has at 0% rather than jumping to that value when the animation is triggered. As a developer I think the intent expressed by canceling the animation is not just to temporarily remove the `fill: backwards` but to completely skip the animation unless / until I explicitly play it.

If we make it so that "playing" an animation means to arm the trigger, this nicely explains how an animation constructed by element.animate or css animations with a trigger would not begin advancing immediately - they enter their before (or after depending on playback direction) phase until the trigger condition is met.

Note that this is not a specific way of addressing this particular issue but a broad framework for thinking about how to make sense of the impact of animation triggers on all of the interactions with other animation properties.

-- 
GitHub Notification of comment by flackr
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12064#issuecomment-2810231481 using your GitHub account


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

Received on Wednesday, 16 April 2025 17:23:13 UTC