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
The layout of the scroll container's contents in the example.
116
-
The snap alignment container is represented by the red rectangle, and the snap margin is represented by the yellow rectangle. Since the scroll-snap-align is "center" in the X axis, a snap position is established at each scroll offset which aligns the X-center of the snap alignment container (represented by a red dotted line) with the X-center of a snap margin (represented by a yellow dotted line).
116
+
The snap alignment container is represented by the red rectangle, and the snap area is represented by the yellow rectangle. Since the scroll-snap-align is "center" in the X axis, a snap position is established at each scroll offset which aligns the X-center of the snap alignment container (represented by a red dotted line) with the X-center of a snap area (represented by a yellow dotted line).
The layout of the scroll container's contents in the example.
161
-
The snap alignment container is represented by the red rectangle (inset from the top by 100px due to the scroll-snap-padding), and the snap margin is represented by the yellow rectangle. Since the scroll-snap-align is "start" in the Y axis, a snap position is established at each scroll offset which aligns the Y-start of the snap alignment container (represented by a red dotted line) with the Y-start of a snap margin (represented by a yellow dotted line).
161
+
The snap alignment container is represented by the red rectangle (inset from the top by 100px due to the scroll-snap-padding), and the snap area is represented by the yellow rectangle. Since the scroll-snap-align is "start" in the Y axis, a snap position is established at each scroll offset which aligns the Y-start of the snap alignment container (represented by a red dotted line) with the Y-start of a snap area (represented by a yellow dotted line).
162
162
</figcaption>
163
163
</figure>
164
164
</div>
@@ -186,7 +186,7 @@ Overview {#overview}
186
186
187
187
<a>Snap positions</a> can be specified
188
188
as a particular alignment ('scroll-snap-align')
189
-
of an element's <a>scroll snap margin</a> ('scroll-snap-margin', defaulting to its border box)
189
+
of an element's <a>scroll snap area</a> ('scroll-snap-margin', defaulting to its border box)
190
190
within the <a>scroll container</a>’s <a>snap alignment container</a>
191
191
(its visual viewport, as reduced by its 'scroll-snap-padding').
192
192
This is conceptually equivalent to specifying the alignment of
The 'scroll-snap-margin' property defines the <a>scroll snap margin</a> on elements within a <a>scroll container</a>, used in calculating <a>snap positions</a> for that scroll container.
382
+
The 'scroll-snap-margin' property defines the <a>scroll snap area</a> on elements within a <a>scroll container</a>, used in calculating <a>snap positions</a> for that scroll container.
383
383
384
384
The 'scroll-snap-margin' property defines
385
385
the <dfn lt="scroll snap area" local-lt="snap area">scroll snap area</dfn>
axis-aligned in the <a>scroll container’s</a> coordinate space.
392
392
393
-
Note: This ensures that the <a>scroll snap margin</a> is always rectangular and axis-aligned to the <a>scroll container's</a> coordinate space.
393
+
Note: This ensures that the <a>scroll snap area</a> is always rectangular and axis-aligned to the <a>scroll container's</a> coordinate space.
394
394
395
395
This property is a <a>shorthand property</a> that sets all of the <a href="#longhands"><css>scroll-snap-margin-*</css> longhands</a> in one declaration.
The 'scroll-snap-align' property specifies how an element's scroll snap margin should align with its ancestor scroll container's snap alignment container. The two values specify the snapping behavior in the x and y axes, respectively. If only one value is specified, the second value defaults to the same value.
422
+
The 'scroll-snap-align' property specifies how an element's scroll snap area should align with its ancestor scroll container's snap alignment container. The two values specify the snapping behavior in the x and y axes, respectively. If only one value is specified, the second value defaults to the same value.
423
423
424
424
Issue: Should this be x/y axes, or inline/block? Starting with x/y axes for consistency with padding/area, otherwise a writing mode change would result in a axis mismatch (since padding is physical by default).
The scroll offset which aligns the start edge of this box's scroll snap margin with the start edge of its ancestor scroll container's region defined by 'scroll-snap-padding' in the specified axis is a <a>snap position</a> in that axis.
433
+
The scroll offset which aligns the start edge of this box's scroll snap area with the start edge of its ancestor scroll container's region defined by 'scroll-snap-padding' in the specified axis is a <a>snap position</a> in that axis.
434
434
435
435
<dt><dfn>end</dfn>
436
436
<dd>
437
-
The scroll offset which aligns the end edge of this box's scroll snap margin with the end edge of its ancestor scroll container's region defined by 'scroll-snap-padding' in the specified axis is a <a>snap position</a> in that axis.
437
+
The scroll offset which aligns the end edge of this box's scroll snap area with the end edge of its ancestor scroll container's region defined by 'scroll-snap-padding' in the specified axis is a <a>snap position</a> in that axis.
438
438
439
439
<dt><dfn>center</dfn>
440
440
<dd>
441
-
The scroll offset which aligns the center of this box's scroll snap margin with the center of its ancestor scroll container's region defined by 'scroll-snap-padding' in the specified axis is a <a>snap position</a> in that axis.
441
+
The scroll offset which aligns the center of this box's scroll snap area with the center of its ancestor scroll container's region defined by 'scroll-snap-padding' in the specified axis is a <a>snap position</a> in that axis.
442
442
</dl>
443
443
444
444
<!--
@@ -519,7 +519,7 @@ Physical Longhands for 'scroll-snap-margin' {#margin-longhands-physical}
519
519
Animatable: as length
520
520
</pre>
521
521
522
-
These <a>longhands</a> of 'scroll-snap-margin' specify the top, right, bottom, and left edges of the <a>scroll snap margin</a>, respectively.
522
+
These <a>longhands</a> of 'scroll-snap-margin' specify the top, right, bottom, and left edges of the <a>scroll snap area</a>, respectively.
523
523
524
524
Flow-relative Longhands for 'scroll-snap-margin' {#margin-longhands-logical}
@@ -536,7 +536,7 @@ Flow-relative Longhands for 'scroll-snap-margin' {#margin-longhands-logical}
536
536
Animatable: as length
537
537
</pre>
538
538
539
-
These <a>longhands</a> of 'scroll-snap-margin' specify the block-start, inline-start, block-end, and inline-end edges of the <a>scroll snap margin</a>, respectively.
539
+
These <a>longhands</a> of 'scroll-snap-margin' specify the block-start, inline-start, block-end, and inline-end edges of the <a>scroll snap area</a>, respectively.
@@ -550,7 +550,7 @@ Flow-relative Longhands for 'scroll-snap-margin' {#margin-longhands-logical}
550
550
Animatable: as length
551
551
</pre>
552
552
553
-
These <a>shorthands</a> of 'scroll-snap-margin-block-start' + 'scroll-snap-margin-block-end' and 'scroll-snap-margin-inline-start' + 'scroll-snap-margin-inline-end' are <a>longhands</a> of 'scroll-snap-margin', and specify the block-axis and inline-axis edges of the <a>scroll snap margin</a>, respectively.
553
+
These <a>shorthands</a> of 'scroll-snap-margin-block-start' + 'scroll-snap-margin-block-end' and 'scroll-snap-margin-inline-start' + 'scroll-snap-margin-inline-end' are <a>longhands</a> of 'scroll-snap-margin', and specify the block-axis and inline-axis edges of the <a>scroll snap area</a>, respectively.
554
554
555
555
If two values are specified, the first gives the start value and the second gives the end value.
0 commit comments