Re: [csswg-drafts] [css-animations] or [css-selectors] Abiliity to invoke an animation on the "exit" of a state selector (#9062)

I think that with the proposed [`animation-trigger`](https://github.com/w3c/csswg-drafts/issues/8942) you can achieve this. If I'm not mistaken, the only thing that would be missing is to define how a state can produce a timeline, and then the ranges should simply be whether the state is on/off.
I guess if the `animation-delay` doesn't exactly match here we could try defining time-based ranges that expand the trigger's timeline.
Then you could define a trigger of type `alternate` with a timeline of the state and you'll get the reversed animation played on exit.

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


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

Received on Friday, 29 March 2024 11:01:10 UTC