[csswg-drafts] [css-scroll-snap-1] Clarification of interaction between mandatory strictness and visibility requirement

majido has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-scroll-snap-1] Clarification of interaction between mandatory strictness and visibility requirement ==
I need clarification on how `mandatory` strictness interacts with visibility requirement for validity of snap position.

## Relevant spec text


> If specified on a scroll container, the scroll container is required to be snapped to a snap position when there are no active scrolling operations. If a reachable snap position exists then the scroll container must snap at the termination of a scroll (if none exist then no snapping occurs).

This is followed by a note which in particular explains this situation:
> if authors assign mandatory snapping to non-adjacent siblings, content in between can become inaccessible in cases where it is longer than the screen.

Later in the specification i.e., [Scoping Valid Snap Positions to Visible Boxes](https://drafts.csswg.org/css-scroll-snap/#snap-scope), limits valid snap positions from snap areas that at least some part of it is within the snapport.

## My Understanding

Here is how I understand a generic algorithm that implements this will work:
1. Compute a set of valid snap position only including positions contributed from snap areas that are considered visible
2. If the above set is empty, we should not snap even with `mandatory` strictness
3. Otherwise, we should choose a snap position and snap.

## Issue 
If this is the right understanding, I think the none normative text is confusing and incorrect. In particular, larger than snapport content between two adjacent snap points does not become inaccessible even when with `mandatory` strictness. This is because if user scroll ends in that area, those snap positions are outside snapports and thus not valid, therefore we do not snap.

Perhaps I am missing something.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2526 using your GitHub account

Received on Tuesday, 10 April 2018 14:33:18 UTC