Skip to content

Commit 09eac57

Browse files
committed
[css-scroll-snap] Clarify behavior of 'scroll-snap-stop'. Fixes #1552.
1 parent 098d203 commit 09eac57

File tree

1 file changed

+21
-6
lines changed

1 file changed

+21
-6
lines changed

css-scroll-snap/Overview.bs

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -744,23 +744,36 @@ Scroll Snap Limits: the 'scroll-snap-stop' property {#scroll-snap-stop}
744744
Media: interactive
745745
</pre>
746746

747-
This property specifies whether the <a>scroll container</a>
748-
must stop at a <a>snap position</a> definited by this element,
749-
or may pass through it before coming to rest.
747+
When scrolling with an intended direction,
748+
the <a>scroll container</a> can “pass over” several possible <a>snap positions</a>
749+
(that would be valid to snap to,
750+
if the scrolling operation used the same direction
751+
but a lesser distance)
752+
before reaching the natural endpoint of the scroll operation
753+
and selecting its final <a>scroll position</a>.
754+
The 'scroll-snap-stop' property allows such a possible <a>snap position</a>
755+
to “trap” the scrolling operation,
756+
forcing the <a>scroll container</a> to stop
757+
before the scrolling operation would naturally end.
758+
750759
Values are defined as follows:
751760

752761
<dl dfn-type=value dfn-for=scroll-snap-stop>
753762
<dt><dfn>normal</dfn>
754763
<dd>
755-
The <a>scroll container</a> may pass by a <a>snap position</a> defined
764+
The <a>scroll container</a> may pass over a <a>snap position</a> defined
756765
by this element during the execution of a scrolling operation.
757766

758767
<dt><dfn>always</dfn>
759768
<dd>
760-
The <a>scroll container</a> must not pass by a <a>snap position</a>
761-
defined by this element during the execution of a scrolling operation.
769+
The <a>scroll container</a> must not pass over a <a>snap position</a>
770+
defined by this element during the execution of a scrolling operation;
771+
it must instead snap to the first of this element's <a>snap positions</a>.
762772
</dl>
763773

774+
This property has no effect on scrolling operations with only an <a>intended end position</a>,
775+
as they do not conceptually “pass over” any <a>snap positions</a>.
776+
764777
Snapping Mechanics {#snap-concepts}
765778
===================================
766779

@@ -1094,6 +1107,8 @@ Changes {#changes}
10941107
<ins><p class="note">This specification only applies to scrolling methods supported by the user agent;
10951108
it does not require the user agent to support any particular input or scrolling method.</p></ins>
10961109
</blockquote>
1110+
<li>Clarified the intended effects of 'scroll-snap-stop' on various scrolling operations.
1111+
(<a href="https://github.com/w3c/csswg-drafts/issues/1552">Issue 1552</a>)
10971112
<li>Clarified that 'scroll-snap-stop' is applied to the <a>snap positions</a> defined by the element,
10981113
not applied to all <a>snap positions</a> in the <a>scroll snap container</a>.
10991114
<li>Fixed some syntax errors in examples and added a new one to the 'scroll-snap-type' section.

0 commit comments

Comments
 (0)