Re: [csswg-drafts] [css-scroll-snap-2] Better snap physics and customization? (#8549)

So in terms of an algorithm the UA could apply, we could scan through snap points in the scroll direction and reduce fling distance in some UA-chosen way based on this value on encountering each scroll-snap-stop point.

I am a bit worried that if we don't apply the friction uniformly it will be really hard to scroll less than that distance. For example, imagine a scroller where 5 items fit per screen. If we apply more friction to every 5th item, then it will be really hard to scroll less than 5 items. This might be fine, but it feels like it would be better to express this as those other items not having any scroll-snap-stop power. Naively, I'd want the scroll-snap-stop friction of each point to add up such that it scrolls about a page worth of items for some standard length fling.

So TLDR, I'd propose the friction of each `scroll-snap-stop` item be based on its proportion of the developer specified target distance.

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


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

Received on Friday, 10 March 2023 15:54:51 UTC