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

RE: [css-snappoints] Various issues

From: Matt Rakow <marakow@microsoft.com>
Date: Fri, 13 Dec 2013 21:23:02 +0000
To: Tab Atkins Jr. <jackalmage@gmail.com>, Robert O'Callahan <robert@ocallahan.org>
CC: www-style <www-style@w3.org>, Miranda Emery <miranda.j.emery@gmail.com>
Message-ID: <87cec0590b704439abf99ce56c0bee49@BL2PR03MB260.namprd03.prod.outlook.com>
I've been spending some time thinking about this as well.  There are a couple additional element-snapping scenarios I'd like to make sure are also addressed, in particular:
1) Snapping an element to the center of a scroller (instead of the edge)
2) Snapping an element to some offset from the edge (e.g. next/previous item "peeks" to show the user there is more content)

I've got some thoughts on how we might generalize this proposal a bit more to make these scenarios a bit easier to solve, and am working on a writeup for consideration.

The directionally-dependent snapping behavior sounds interesting, though I'll need some time to wrap my head around what the behavior would be like in some of the applications we've seen.  Do you have any particular scenarios where you're applying this behavior that help illustrate its benefits?


> -----Original Message-----
> From: Tab Atkins Jr. [mailto:jackalmage@gmail.com]
> Sent: Friday, December 13, 2013 10:07 AM
> To: Robert O'Callahan
> Cc: www-style; Miranda Emery
> Subject: Re: [css-snappoints] Various issues
> On Fri, Dec 13, 2013 at 2:55 AM, Robert O'Callahan <robert@ocallahan.org>
> wrote:
> > Following up with more data and a fairly drastic revision to the
> > scroll-snap-edges proposal.
> >
> > Now that Miranda's implemented a basic prototype of our proposal, we
> > immediately realized that it doesn't make sense to simply snap the
> > scroll position to the top/left/right edge of some element. For
> > example, when scrolling down, you're not interested in aligning the
> > top edge of some element with the top of the container. Instead you
> > want the bottom edge of some element aligned with the bottom edge of
> > the container because you want to see whole elements at the bottom of
> > the container, even if it means you have to show partial elements at the
> top.
> >
> > So I've revised https://wiki.mozilla.org/Gecko:CSSScrollSnapping to
> > make scroll-snap-edges take "none", "border-box" and "margin-box"
> > values. When scrolling down you snap the bottom edge of the specified
> > box to the bottom edge of the container, and analogously for the other
> > directions. This makes RTL a non-issue. It does however mean that
> > scroll-snap-type:mandatory can't be strict apart from scroll gestures,
> because in a lot of cases (e.g.
> > DOM/style changes) we don't know what direction to use for snapping.
> This sounds pretty good, and I like that it eliminates the naming issues, since I
> was unhappy about them too.
> ~TJ

Received on Friday, 13 December 2013 21:23:30 UTC

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