Re: [csswg-drafts] [web-animations-2][css-animations-2] Set of actions for animation triggers (#12611)

Note that in general for terminology we should probably say activate and deactivate, rather than enter and exit which are really specific to timeline triggers.

Re @ydaniv 
> And where it gets interesting:
> 
> Specified enter behavior `auto` computed enter/exit behaviors
> `play-pause` `play` `pause`
> `play-alternate` `play-forwards` `play-backwards`
> `play-reset` `play` `reset`

This is incorrect. Per the posted table https://github.com/w3c/csswg-drafts/issues/12611#issuecomment-3292998336, play-pause, play-alternate, and play-reset have non-compound meanings as a single actions. E.g. for play-pause if the animation is paused, then play. If it's playing, pause. This action can be repeated for both the activate and deactivate or it can be used only for the activate. If you automatically compute it to mean play pause, then it would not work for a single event trigger.

The reasonable computed `auto` value for play-pause and play-alternate is to repeat the play-pause or play-alternate.

> because I see that behaviors like play-pause are more like compound behaviors that set both the enter and exit in one go.

See above. They are single action behaviors.

> Then the play-forwards is never triggered since there's no event mapped to it.

I think you mean `play-backwards`.



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


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

Received on Tuesday, 7 October 2025 13:52:49 UTC