Re: [csswg-drafts] [scroll-animations-1] currentTime when scroll range is 0 (again) (#7778)

I was thinking about this a bit more, and while I still think that for ScrollTimeline the current behaviour is correct, you can construct a view timeline whose animatable range approaches a known value as the scroll range goes to 0.

For example, I put together a [demo](https://jsbin.com/dedovoh/1/edit?html,css,js,output) (with [polyfill](https://jsbin.com/kibidim/edit?html,css,js,output) is a bit harder to play with since it [doesn't currently respond to position changes](https://github.com/flackr/scroll-timeline/issues/98)) where as you grow the scrollable area the range of the animation approaches a particular value. I think when the range is a single value I would expect that value to be the current progress rather than becoming inactive. I think this would require an edit to [the previous text](https://drafts.csswg.org/scroll-animations-1/#view-timelines:~:text=or%20if%20its%20nearest%20ancestor%20scroll%20container%20has%20no%20scrollable%20overflow).

Interestingly, the chromium implementation already does what I would expect in this case, so I think we may just need to allow it from the spec side. The particular text would probably be easier to write if the spec had the current time formula. as we could then determine the exact conditions under which it approaches a known value when the scroll range goes to 0.

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


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

Received on Thursday, 10 November 2022 14:25:31 UTC