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

I have another direction at this:

 - Change the name of Trigger's state `idle` to something else, like `pending`. I think I chose a bad name here which doesn't correctly describes the behavior of the state.
 - Add a new Trigger state named `idle`, which behaves as the name suggests, makes the Trigger effectless.
 - When running [`Cancelling an animation`](https://drafts.csswg.org/web-animations-1/#canceling-an-animation-section) procedure we add an extra step that sets associated trigger's state to `idle`.
 - Add a step in [`Updating Animation Trigger State`](https://drafts.csswg.org/web-animations-2/#updating-trigger-state) that checks if state is `idle`, and if so it aborts the procedure.
 - Add a step in [`Playing an animation`](https://drafts.csswg.org/web-animations-1/#playing-an-animation-section) that checks if the associated trigger's state is `idle`, and if so resets it to `pending`.

I think this solves the `cancel()`/`play()` issue and avoids adding any additional complications to the existing model.

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


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

Received on Thursday, 24 April 2025 14:00:14 UTC