File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -529,6 +529,28 @@ Scroll Snapping Alignment: the 'scroll-snap-align' property {#scroll-snap-align}
529529 the position applies to both axises.
530530 </dl>
531531
532+ Since the purpose of scroll snapping is to align content within the viewport
533+ for optimal viewing:
534+ in all cases, the specified alignment creates a valid <a>snap position</a>
535+ only if at least part of the <a>snap area</a> is within the <a>snap viewport</a> .
536+ For example, a <a>snap area</a> is top-aligned to the <a>snap viewport</a>
537+ if its top edge is coincident with the <a>snap viewport</a> ’s top edge;
538+ however, this alignment is nonetheless not a valid <a>snap position</a>
539+ if the entire <a>snap area</a> is outside the <a>snap viewport</a> .
540+
541+ <details class="why">
542+ <summary> Why</summary>
543+ As the <a href="https://www.webkit.org/blog/4017/scroll-snapping-with-css-snap-points/">WebKit implementers point out</a> ,
544+ extending a snap edge infinitely across the canvas
545+ only allows for snapping gridded layouts,
546+ and produces odd behavior for the user
547+ when off-screen elements do not align
548+ with on-screen elements.
549+ (If this requirement is onerous for implementers however,
550+ we can default to a gridded behavior
551+ and introduce a switch to get smarter behavior.)
552+ </details>
553+
532554 For all of these values,
533555 the <a>block</a> or <a>inline</a> axis
534556 is relative to the element's parent's <a>writing mode</a> .
You can’t perform that action at this time.
0 commit comments