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

Re: [css-scroll-snap][css-snappoints] snapping to unreachable snap points

From: Florian Rivoal <florian@rivoal.net>
Date: Wed, 10 Aug 2016 12:40:54 +0900
Cc: CSS public list <www-style@w3.org>
Message-Id: <3673C6B3-E182-47EB-BB21-EAC55FC705E9@rivoal.net>
To: fantasai <fantasai.lists@inkedblade.net>

> On Apr 7, 2016, at 06:55, fantasai <fantasai.lists@inkedblade.net> wrote:
> 
> 
> On 01/27/2016 11:36 AM, Florian Rivoal wrote:
>> 
>> I don't know how you define "the corridor". Is it finite in
>> length, or extended infinitely along the direction of the scroll?
>> I understand it as the later. So for me, in that example the last
>> image is in the corridor, since it would enter the snap viewport
>> if you kept scrolling along the same direction. But you can't
>> because you hit the edge first, and when you do, due to a large
>> snap padding, the image has not entered the snap viewport.
> 
> 
> My intention was to handle this issue in this paragraph:
> 
> # If the most appropriate snap position is unreachable,
> # such that aligning to it would require scrolling the
> # scroll container’s viewport past the edge of its
> # scrollable area, the scroll container must be scrolled
> # as much as possible in each relevant axis toward the
> # desired snap position. This is the used snap position
> # corresponding to that snap position; that is, the UA
> # must “snap” to this position just as it would have if
> # it were the actual specified alignment.
> 
> In particular, the second sentence is redefining the effective
> snap position for that last element, so a UA *must* treat it
> as if it were reachable. However, since this wasn't clear,
> we've tweaked the wording slightly to be more explict and
> shifted it into the definition of 'scroll-snap-align':
> https://drafts.csswg.org/css-scroll-snap/#unreachable
> 
> Let us know if that addresses your concerns.

Sorry for the belated answer. The prose in the spec has evolved a little since your mail, but the intent remains essentially the same as what you proposed. My comment takes these changes into account.

I believe that this phrasing mostly, but not entirely clarifies the situation. I guess I could live with it, but if possible, I would prefer a full clarification. What I believe is missing is a clarification in the "corridor" in section 6.2 (https://drafts.csswg.org/css-scroll-snap/#choosing), that would make it explicit that this discussion about excluding things that fall out of the corridor is not meant to exclude snap points that would be in the trajectory of the snapport but cannot be reached because we hit the end of the scroller first. The propose you mentioned above or the updated version of it says how to snap to an out of reach position when you want to, but it does not say whether you should, and the "corridor" discussion, although I believe it is only intended to exclude off-to-the-side elements, may also be understood to exclude too-far-ahead elements.

- Florian
Received on Wednesday, 10 August 2016 03:41:23 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 10 August 2016 03:41:23 UTC