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
For a scroll container, a particular value for its scroll offset is a snap position if when scrolled to that offset the scrollport of the scroll container would align with a descendent element in the manner specified by the scroll snap properties.
The 'scroll-snap-type' property specifies how strictly a <a>scroll container</a> should <a>snap</a>, and which axes are considered.
260
+
The 'scroll-snap-type' property specifies whether a <a>scroll container</a> is a <a>scroll snap container</a>, how strictly a <a>scroll container</a> should <a>snap</a>, and which axes are considered.
271
261
272
262
The <dfn noexport lt="strictness value">strictness values</dfn>
If specified on a <a>scroll container</a>, the<a>scroll container</a> must not <a>snap</a>.
287
277
288
278
<dt><dfn>mandatory</dfn>
289
279
<dd>
290
-
The<a>scroll container</a> is required to be <a>snapped</a> to a snap position when there are no active scrolling operations. If a reachable snap position exists then the scroll container must <a>snap</a> at the termination of a scroll. If no reachable snap position exists then no <a>snapping</a> occurs.
280
+
If specified on a <a>scroll container</a>, the<a>scroll container</a> is required to be <a>snapped</a> to a snap position when there are no active scrolling operations. If a reachable snap position exists then the scroll container must <a>snap</a> at the termination of a scroll. If no reachable snap position exists then no <a>snapping</a> occurs.
291
281
292
282
If the content changes such that the scroll container would no longer be <a>snapped</a> (e.g. content is added, moved, deleted, resized) to the same snap position it was snapped to before the content change, the scroll container must be re-snapped. If the same snap position it was snapped to before the content change still exists (e.g. its associated element was not deleted) and is reachable, the scroll container must be re-snapped to that same snap position after the content change.
293
283
284
+
If specified on a non-<a>scroll container</a>,
285
+
this value “traps” descendant boxes’ <a>snap positions</a>,
286
+
preventing them from affecting any ancestor <a>scroll containers</a>.
287
+
294
288
<dt><dfn>proximity</dfn>
295
289
<dd>
296
-
The<a>scroll container</a> may <a>snap</a> to a snap position at the termination of a scroll, at the discretion of the UA given the parameters of the scroll.
290
+
If specified on a <a>scroll container</a>, the<a>scroll container</a> may <a>snap</a> to a snap position at the termination of a scroll, at the discretion of the UA given the parameters of the scroll.
297
291
298
292
If the content changes such that the scroll container would no longer be <a>snapped</a> (e.g. content is added, moved, deleted, resized) to the same snap position it was snapped to before the content change and that same snap position still exists (e.g. its associated element was not deleted) and is reachable, the scroll container must be re-snapped to that same snap position after the content change.
293
+
294
+
If specified on a non-<a>scroll container</a>,
295
+
this value “traps” descendant boxes’ <a>snap positions</a>,
296
+
preventing them from affecting any ancestor <a>scroll containers</a>.
299
297
</dl>
300
298
299
+
A box <dfn export>captures snap positions</dfn>
300
+
if it is a <a>scroll container</a>
301
+
<em>or</em> has a value other than ''scroll-snap-type/none'' for 'scroll-snap-type'.
302
+
If a box's nearest <a lt="captures snap positions">snap-position capturing</a> ancestor
303
+
on its <a>containing block chain</a>
304
+
is a <a>scroll container</a> with a non-''scroll-snap-type/none'' value for 'scroll-snap-type',
305
+
that is the box's <dfn export local-lt="snap container">scroll snap container</dfn>.
306
+
Otherwise, the box has no <a>scroll snap container</a>,
307
+
and its <a>snap positions</a> do not trigger <a>snapping</a>.
308
+
301
309
The <dfn noexport lt="axis value">axis values</dfn>
302
310
specify what axis(es) are affected by <a>snap positions</a>,
303
311
and whether <a>snap positions</a> are evaluated independently per axis,
0 commit comments