Re: CSS properties for snapping during scrolling

On Aug 15, 2013, at 2:39 AM, Morten Stenshorne <mstensho@opera.com> wrote:

> "Robert O'Callahan" <robert@ocallahan.org> writes:
> 
>> 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.
>> 
>> 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.
> 
> For such a use case, have you considered paged overflow [1][2]?

That's exactly what I was thinking. There was an earlier thread where HÃ¥kon and I were discussing the paging effect, and having a property to set the effect. So, what you are suggesting might be as simple as this:

Overflow:paged;
Page-transition: inline-push; /* new page pushes old page aside in the inline direction */


> You can try this one out in a Presto-based Opera:
> http://people.opera.com/mstensho/t/paged2.html (you can pan if you hold
> down ctrl+alt while dragging)
> 
> [1] http://dev.w3.org/csswg/css-overflow-3/#overflow-properties
> [2] http://dev.w3.org/csswg/css-gcpm/#paged-presentations

Received on Thursday, 15 August 2013 14:06:52 UTC