Re: [csswg-drafts] [css-transitions]/[css-animations] Proposal: Allow velocity values for transition-duration and animation-duration (#5091)

I have received several requests for this when talking to authors (e.g. https://bsky.app/profile/jpzwarte.bsky.social/post/3llnx3uavjc2i) and also have had this need myself.

Regarding the naming: velocity is a measured _speed_ in a certain _direction_ _([ref](https://www.britannica.com/story/whats-the-difference-between-speed-and-velocity))_ so I believe the thing that should be requested here is a way to set the _speed_, not the velocity.

On previous occasions I’ve chatted with @argyleink about this, and we were thinking of a `animation-speed` CSS property to set this. Something like `animation-speed: 500px/1s`. One of the immediate pieces of feedback I got on this from @flackr (and something that I also see mentioned in this thread) is that this would only be able to deal with things that are related to a distance.

My current thinking here is that the `animation-speed` could perhaps accept a dimension to deal with, which would make it derive things from there – e.g. `animation-speed: rotate 3deg/1s` would look at the rotation “distance” at the end state and then base the timing for the entire animation off of that. It’s still a rough idea, but perhaps it could inspire people to having better ideas for this.

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


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

Received on Friday, 22 August 2025 13:20:26 UTC