3 ms·
> If you've used CSS transitions you'll have encountered the problem this solves. Okay, my duration is 400ms -- but why 400? Shouldn't it depend on how far it h
by rav 3y ago
> If you've used CSS transitions you'll have encountered the problem this solves. Okay, my duration is 400ms -- but why 400? Shouldn't it depend on how far it has to move?
It seems to me that the "speed" parameter in the exponential function has the same issue, does it not?
- iainmerrick 3y agoIf you use the version somebody else here mentioned, “move 90% of the way to the destination in 80ms”, does that make more sense? (I think it’s equivalent, just a change of units.)
- rav 3y agoBut can't you then also change the units on the linear animations? "move 40px/s until you reach the destination"
- iainmerrick 3y agoI don't think there's any way to do that in pure CSS (which is what I was comparing to). You can specify transition duration, but not speed.
- rav 3y agoAh, I think I considered the article to be a supposed improvement to CSS animations - in which case both exponential smoothing and px/s transitions would be independent improvements.