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.
105
-
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).
105
+
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).
The layout of the scroll container's contents in the example.
150
-
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).
150
+
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).
This property is a shorthand property that sets all of the 'scroll-snap-padding-*' longhands in one declaration.
261
261
262
-
<h2 id="scroll-snap-area">Scroll Snap Area: the 'scroll-snap-area' property</h2>
262
+
<h2 id="scroll-snap-margin">Scroll Snap Margin: the 'scroll-snap-margin' property</h2>
263
263
264
-
The 'scroll-snap-area' 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.
264
+
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.
Specifies the outset of the element's snap area from the axis-aligned bounding box of the transformed border box, in the <a>scroll container's</a> coordinate space. Outsets are applied to this bounding box, not the border box.
281
+
Specifies the outset of the element's snap margin from the axis-aligned bounding box of the transformed border box, in the <a>scroll container's</a> coordinate space. Outsets are applied to this bounding box, not the border box.
282
282
283
-
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.
283
+
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.
284
284
</dl>
285
285
286
-
This property is a shorthand property that sets all of the 'scroll-snap-area-*' longhands in one declaration.
286
+
This property is a shorthand property that sets all of the 'scroll-snap-margin-*' longhands in one declaration.
287
287
288
288
<h2 id="scroll-snap-align">Scroll Snap Align: the 'scroll-snap-align' property</h2>
289
289
290
-
The 'scroll-snap-align' property specifies how a scroll container's region specified by 'scroll-snap-padding' should align with descendent elements' scroll snap area. 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.
290
+
The 'scroll-snap-align' property specifies how a scroll container's region specified by 'scroll-snap-padding' should align with descendent elements' scroll snap margin. 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.
291
291
292
292
<p class="issue">
293
293
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 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.
315
+
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.
316
316
317
317
<dt><dfn>end</dfn>
318
318
<dd>
319
-
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.
319
+
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.
320
320
321
321
<dt><dfn>center</dfn>
322
322
<dd>
323
-
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.
323
+
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.
0 commit comments