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

I think we have enough agreement about the simpler keywords:

`play | play-once | play-forwards | play-backwards | pause | reset | replay | none`

that I would propose we resolve on those and defer on `play-alternate | play-pause | play-reset`.

As such, the **proposed resolution** is to adopt the following table:

Keyword | Playing | Paused | Finished
-- | -- | -- | --
play | nothing | play() | play()
play-once | nothing | play() | nothing
play-forwards | Set playback rate positive | Set playback rate positive, play() | (same as paused)
play-backwards | Set playback rate negative | Set playback rate negative, play() | (same as paused)
pause | pause() | nothing | nothing
reset | set progress to 0, pause() | (same as playing) | (same as playing)
replay | set progress to 0 | set progress to 0, play() | set progress to 0, play()

For completeness, here is the proposed syntax in full:

`animation-trigger: [ [ <dashed-ident> <enter-behavior> <exit-behavior>? ]+ ]#`

where:

- \<enter-behavior\> and \<exit behavior\> are each declared using one of the keywords in the table.
- \<exit-behavior\> is optional and is `none` when omitted.




-- 
GitHub Notification of comment by DavMila
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12611#issuecomment-3377529486 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 15:52:41 UTC