3 ms·
What I also would _love_ is a function based on velocity, or speed per logical pixel. So that a transition that happens over say 200px does not take the same ti
by Y-bar 1y ago
What I also would _love_ is a function based on velocity, or speed per logical pixel. So that a transition that happens over say 200px does not take the same time as the same transition happening over 450px.
--myidea-tranistion-timing: 1px/5ms;
The above would take one second (200pixels at 5ms per pixel) to transition a 200px distance, and would take 2.25 seconds to transition 450px because the velocity would be the same.
- semolino 1y agoThat would be awesome — I have found myself wishing for a similar CSS-only solution. In the meantime, I've resorted to measuring the translation distance in JS, and multiplying that by the average duration I want the element to spend in each pixel position (usually a few milliseconds).
- Y-bar 1y agoI found an actual proposal which is very similar: https://github.com/w3c/csswg-drafts/issues/5091 https://github.com/w3c/csswg-drafts/issues/5091