W3C home > Mailing lists > Public > www-style@w3.org > August 2013

Re: CSS properties for snapping during scrolling

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 14 Aug 2013 23:16:56 -0700
Message-ID: <CAAWBYDCdmoXUqTu9e=DV9fFRSv+6Sg1pvF3Hf5YJN+gu4UD0Ww@mail.gmail.com>
To: "Robert O'Callahan" <robert@ocallahan.org>
Cc: www-style <www-style@w3.org>
On Wed, Aug 14, 2013 at 11:04 PM, Robert O'Callahan
<robert@ocallahan.org> wrote:
> Microsoft introduced a large number of CSS properties controlling scrolling
> and zooming in Windows 8:
> http://msdn.microsoft.com/en-us/library/ie/hh920761%28v=vs.85%29.aspx
> As far as I know, none of them other than touch-action have been proposed
> for standardization so far.

I've been planning to do a spec for most of these for *months*, but
I've been waiting for Jacob Rossi to give the go-ahead from MS legal
that they're clear patent-wise and whatever to standardize them

> One of the features that we have use-cases for at Mozilla is the ability to
> snap scrolling to land at specific offsets. One such use-case is touch-based
> horizontal panning between pages of the home-screen in FirefoxOS. At the end
> of the panning gesture the screen should show a single page, not parts of
> two pages. An underlying physics model determines which page is selected
> when the gesture ends, and the selected page snaps into place using
> animation. Similar use-cases arise from many situations involving scrolling
> through a list of items.
> The Microsoft CSS properties for this are -ms-scroll-snap-points-x/y and
> -ms-scroll-snap-type:
> http://msdn.microsoft.com/en-us/library/ie/hh920761%28v=vs.85%29.aspx#creating_content_snap_points
> Their approach requires explicitly specifying a sequence of CSS lengths (or
> percentages) representing allowable snap offsets. It seems to me instead the
> snap offsets should be derived automatically from the layout of the
> descendants of the scrolling container, so that changes to that layout don't
> require manual updating of some property set on the container.
> So, here's my proposal:
> https://wiki.mozilla.org/Gecko:CSSScrollSnapping
> I made this up just now so I expect it has problems :-). The most obvious
> issue right now is that it doesn't handle RTL well. Vertical writing may
> also be a problem.

Yes, this is one of my favorite features, and I agree with your analysis.  ^_^

Received on Thursday, 15 August 2013 06:17:43 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:33 UTC