W3C home > Mailing lists > Public > www-style@w3.org > January 2016

Re: [css-snappoints] [css-scroll-snap] Summary of latest updates 1/13

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Fri, 15 Jan 2016 16:34:22 -0800
Message-ID: <CAAWBYDB2p=Sim58_vCcvzyxzatHMZqoZeatXK5s3UnRN2Vh=Zg@mail.gmail.com>
To: Dean Jackson <dino@apple.com>
Cc: fantasai <fantasai.lists@inkedblade.net>, Matt Rakow <marakow@microsoft.com>, "www-style@w3.org" <www-style@w3.org>, fantasai <fantasai@inkedblade.net>
On Fri, Jan 15, 2016 at 4:07 PM, Dean Jackson <dino@apple.com> wrote:
>> On 16 Jan 2016, at 10:52 AM, fantasai <fantasai.lists@inkedblade.net> wrote:
>>> Ok.  Did you and Apple discuss any additional clarifications that
>>> should be added to address their original concerns?
>>
>> Not specifically, no. But we did just check in a bunch of clarifications
>> in response to Sebastian Zartner's email:
>>  https://lists.w3.org/Archives/Public/www-style/2016Jan/0099.html
>
> We asked for 2d snap points to be deferred from this version. Is there
> anyone actively arguing for it? I thought we agreed in Japan that the
> use case either could be done another way or wasn't necessary (sorry,
> foggy memory as usual).

No, it definitely can't be done in another way, and for the use-cases
presented, it is necessary.

Refer back to the Safari blogpost Elika linked earlier:
https://webkit.org/blog/4017/scroll-snapping-with-css-snap-points/

Example 4 in particular shows a 2d grid of elements.  In this example,
the elements are all precisely grid-aligned, so it doesn't matter
whether you do 2d or double-1d snapping.  But if alternating rows were
offset (like subway tiles or similar), then double-1d snapping would
mean that it could snap to unnatural positions, centering the image
vertically but snapping horizontally to some off-center point (the
center point of one of the tiles in the next/prev row).  The
previous/next rows are visible, so we can't even rely on the "snap
positions that are out of the viewport are ignored" behavior to help
us here.  This behavior would simply be wrong, no argument possible.
You want centered images.  To get centered images in the general case,
you need 2d snapping.

The other major use-case (centering a map on major landmarks/cities
with proximity snap-points) similarly requires 2d snapping, or else
you can fall into a terrible situation where there are two landmarks
on screen, one horizontally centered but in some arbitrary spot near
the top of the screen, and the other vertically centered but in some
arbitrary spot near the left side of the screen.  This is valid
double-1d snap position, but it's completely nonsensical for the
intended display.

~TJ
Received on Saturday, 16 January 2016 00:35:11 UTC

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