Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
[css-scroll-snap-1] Clarification of interaction between mandatory strictness and visibility requirement #2526
I need clarification on how
Relevant spec text
This is followed by a note which in particular explains this situation:
Later in the specification i.e., Scoping Valid Snap Positions to Visible Boxes, limits valid snap positions from snap areas that at least some part of it is within the snapport.
Here is how I understand a generic algorithm that implements this will work:
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
Perhaps I am missing something.
Yes, the visibility thing is about the other axis, it's the case described in the drawing in https://drafts.csswg.org/css-scroll-snap/#snap-scope -- you can't be “snapped” to a thing you can't see. But if there's a snap position further off-screen and when you snap to it, the box is visible, that's fine.
In other words, https://drafts.csswg.org/css-scroll-snap/#snap-scope says that the state of being snapped requires that the thing you're snapped to must be visible. It doesn't say that you can't snap to a thing which is currently off-screen but would become on-screen after you have snapped to it.
Okay, we just rephrased that section a bit:
Does this work for you?