[HN Gopher] Springs and Bounces in Native CSS
___________________________________________________________________
Springs and Bounces in Native CSS
Author : Bogdanp
Score : 59 points
Date : 2025-10-29 09:29 UTC (8 days ago)
(HTM) web link (www.joshwcomeau.com)
(TXT) w3m dump (www.joshwcomeau.com)
| capitainenemo wrote:
| https://news.ycombinator.com/item?id=45736461 duplicate from 9
| days ago, 41 comments
| Sharlin wrote:
| "piecewise" would probably have been a better name than "linear".
| bhollis wrote:
| This is one of those "easy" things that should really be built
| into the CSS standard (as Josh points out in the article).
| Y-bar wrote:
| 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 wrote:
| That 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).
___________________________________________________________________
(page generated 2025-11-06 23:00 UTC)