You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An element which provides a scrolling user interface as described in [[!CSS21]], particularly in the section on overflow.
165
+
166
+
<dt><dfnexport>snap position</dfn>
167
+
<dd>
168
+
For a scroll container, a particular value for its scroll offset is a snap position if when scrolled to that offset the visual viewport of the scroll container would align with a descendent element in the manner specified by the scroll snap properties.
165
169
</dl>
166
170
167
171
<h2id="scroll-snap-type">Scroll Snap Types: the 'scroll-snap-type' property</h2>
168
172
169
-
The ''scroll-snap-type'' property is used to define how strictly snap points are enforced on the <a>scroll container</a>, if any are present. It defines how and when snap points are enforced on the visual viewport of the scroll container it is applied to in order to adjust scroll offset. It intentionally does not specify nor mandate any precise animations or physics used to enforce those snap points; this is left up to the user agent.
173
+
The ''scroll-snap-type'' property is used to define how strictly a <a>scroll container's</a>visual viewport should rest on <a>snap positions</a>. It intentionally does not specify nor mandate any precise animations or physics used to enforce those snap points; this is left up to the user agent.
The visual viewport of this <a>scroll container</a> must ignore snap points, if any, when scrolled.
190
+
The visual viewport of this <a>scroll container</a> must ignore snap positions.
187
191
188
192
<dt><dfn>mandatory</dfn>
189
193
<dd>
190
-
The visual viewport of this <a>scroll container</a> is guaranteed to rest on a snap point when there are no active scrolling operations. That is, it must come to rest on a snap point at the termination of a scroll, if a valid, reachable snap point exists (if no valid, reachable snap point exists then no snapping occurs). If the content changes such that the visual viewport would no longer rest on a snap point (e.g. content is added, moved, deleted, resized), the scroll offset must be modified to maintain this guarantee.
194
+
The visual viewport of this <a>scroll container</a> is guaranteed to rest on a snap position when there are no active scrolling operations. That is, it must come to rest on a snap position at the termination of a scroll, if a valid, reachable snap position exists. If no valid, reachable snap position exists then no snapping occurs. If the content changes such that the visual viewport would no longer rest on a snap position (e.g. content is added, moved, deleted, resized), the scroll offset must be modified to maintain this guarantee.
191
195
192
196
<dt><dfn>proximity</dfn>
193
197
<dd>
194
-
The visual viewport of this <a>scroll container</a> may come to rest on a snap point at the termination of a scroll at the discretion of the UA given the parameters of the scroll. If the content changes such that the visual viewport would no longer rest on a snap point (e.g. content is added, moved, deleted, resized), the scroll offset may be modified to maintain this guarantee.
198
+
The visual viewport of this <a>scroll container</a> may come to rest on a snap position at the termination of a scroll at the discretion of the UA given the parameters of the scroll. If the content changes such that the visual viewport would no longer rest on a snap position (e.g. content is added, moved, deleted, resized), the scroll offset may be modified to maintain this guarantee.
195
199
</dl>
196
200
197
-
<divclass="issue">
198
-
Describe the guarantee as an invariant for better clarity. Include edge case behavior such as mandatory snap points when there is no satisfiable snap point.
199
-
</div>
200
-
201
-
<divclass="issue">
202
-
Should there be a way to specify that either end of the scrollable content should have a snap point?
203
-
</div>
204
-
205
201
<h2id="scroll-snap-destination">Scroll Snap Destination: the 'scroll-snap-destination' property</h2>
206
202
207
203
The 'scroll-snap-destination' property is used to define the x and y coordinate within the <a>scroll container's</a> visual viewport
0 commit comments