Re: [csswg-drafts] [css-animations-2] Proposal: Time-based Keyframe Animations (#4907)

I like the idea. Some questions though:

What happens if an author uses time-based keyframes and declares an `animation-duration` that is not `auto`? 

For example, if the max keyframe is `10s` what happens when :

- The `animation-duration` is set to `5s`?
- The `animation-duration` is set to `15s`?

Would the duration be ignored? Or would it determine things and act as a cutoff?

I would like to assume that the `animation-duration` would determine things in these cases and:

- Cut the frames short when the `animation-duration` is shorter than the max `<time>` in keyframes: the animation stops after `5s`
- Generate the missing `15s` keyframe

Or would the `animation-duration` speed things up / stretch things out? _(I don’t think it should)_

And also, what happens with the `animation-fill-mode` set to `forwards`? Does it use the last keyframe? Or does it use the last keyframe that was _used_? Put differently: in case of the `5s` duration: does it fill to the `5s` keyframe or the `10s` one?

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


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

Received on Friday, 10 January 2025 08:36:37 UTC