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

> 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.

OK, thanks for clarifying. I was indeed treating them as compound. The problem is that if we only treat them as granular and have multiple triggers and you set:

```css
.target {
  event-trigger: --ev click;
  timeline-trigger: --tl view();
  animation-trigger: --ev play-pause --tl play-pause;
}
```

Then you get the following behavior:
- `enter view -> play`
- `click -> pause`
- `exit view -> play`

Which I think isn't optimal 🙁 

> The reasonable computed auto value for play-pause and play-alternate is to repeat the play-pause or play-alternate. Basically the question is what would you expect should happen on exit, if anything, given each of the enter actions. I'm not sure that having an automatic exit behavior is a good idea given both the confusion it generates and cases when it might be wrong which is why I suggest we consider whether we should take this as a second resolution.

Yes, so IMO as granular behaviors they don't achieve they're goal.

Perhaps we defer the compound behavior keywords, we resolve on the rest?
We can either make initial value `none`, or keep the `auto`, since for now `auto` is supposed to resolve to `none` for all of the rest.

-----

> > Then the play-forwards is never triggered since there's no event mapped to it.
>
> I think you mean play-backwards.

Right 🙈 

-- 
GitHub Notification of comment by ydaniv
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12611#issuecomment-3377144677 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 14:23:59 UTC