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 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).
116
+
The snapport 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 snapport (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 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).
161
+
The snapport 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 snapport (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>
@@ -187,7 +187,7 @@ Overview {#overview}
187
187
<a>Snap positions</a> can be specified
188
188
as a particular alignment ('scroll-snap-align')
189
189
of an element's <a>scroll snap area</a> ('scroll-snap-margin', defaulting to its border box)
190
-
within the <a>scroll container</a>’s <a>snap alignment container</a>
190
+
within the <a>scroll container</a>’s <a>snapport</a>
191
191
(its visual viewport, as reduced by its 'scroll-snap-padding').
192
192
This is conceptually equivalent to specifying the alignment of
193
193
an <a>alignment subject</a> within an <a>alignment container</a>.
@@ -216,9 +216,9 @@ Definitions {#definitions}
216
216
<dd>
217
217
An element which provides a scrolling user interface as described in [[!CSS21]], particularly in the section on overflow.
218
218
219
-
<dt><dfn export>snap alignment container</dfn>
219
+
<dt><dfn export>snapport</dfn>
220
220
<dd>
221
-
A scroll container's snap alignment container is the rectangle obtained by reducing its visual viewport by its 'scroll-snap-padding'.
221
+
A scroll container's snapport is the rectangle obtained by reducing its visual viewport by its 'scroll-snap-padding'.
222
222
223
223
Issue: Better name for this concept?
224
224
@@ -325,7 +325,7 @@ Snapport: the 'scroll-snap-padding' property {#scroll-snap-padding}
325
325
Animatable: as length, percentage, or calc
326
326
</pre>
327
327
328
-
The 'scroll-snap-padding' property defines the <a>snap alignment container</a>, a region inset from the visual viewport of a <a>scroll container</a> used in calculating its <a>snap positions</a>. The snap alignment container is used as the alignment container when calculating <a>snap positions</a>. Values are interpreted as for 'padding', and specify inward offsets from each edge of the visual viewport.
328
+
The 'scroll-snap-padding' property defines the <a>snapport</a>, a region inset from the visual viewport of a <a>scroll container</a> used in calculating its <a>snap positions</a>. The snapport is used as the alignment container when calculating <a>snap positions</a>. Values are interpreted as for 'padding', and specify inward offsets from each edge of the visual viewport.
329
329
330
330
<div class="example">
331
331
In this example, scroll-snap-padding is used to center slideshow images within the portion of the viewport that is not obscured by a fixed-position toolbar.
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.
422
+
The 'scroll-snap-align' property specifies how an element's scroll snap area should align with its ancestor scroll container's snapport. 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).
425
425
@@ -469,7 +469,7 @@ Physical Longhands for 'scroll-snap-padding' {#padding-longhands-physical}
469
469
Animatable: as length, percentage, or calc
470
470
</pre>
471
471
472
-
These <a>longhands</a> of 'scroll-snap-padding' specify the top, right, bottom, and left edges of the <a>snap alignment container</a>, respectively.
472
+
These <a>longhands</a> of 'scroll-snap-padding' specify the top, right, bottom, and left edges of the <a>snapport</a>, respectively.
473
473
474
474
Flow-relative Longhands for 'scroll-snap-padding' {#padding-longhands-logical}
@@ -486,7 +486,7 @@ Flow-relative Longhands for 'scroll-snap-padding' {#padding-longhands-logical}
486
486
Animatable: as length, percentage, or calc
487
487
</pre>
488
488
489
-
These <a>longhands</a> of 'scroll-snap-padding' specify the block-start, inline-start, block-end, and inline-end edges of the <a>snap alignment container</a>, respectively.
489
+
These <a>longhands</a> of 'scroll-snap-padding' specify the block-start, inline-start, block-end, and inline-end edges of the <a>snapport</a>, respectively.
@@ -500,7 +500,7 @@ Flow-relative Longhands for 'scroll-snap-padding' {#padding-longhands-logical}
500
500
Animatable: as length, percentage, or calc
501
501
</pre>
502
502
503
-
These <a>shorthands</a> of 'scroll-snap-padding-block-start' + 'scroll-snap-padding-block-end' and 'scroll-snap-padding-inline-start' + 'scroll-snap-padding-inline-end' are <a>longhands</a> of 'scroll-snap-padding', and specify the block-axis and inline-axis edges of the <a>snap alignment container</a>, respectively.
503
+
These <a>shorthands</a> of 'scroll-snap-padding-block-start' + 'scroll-snap-padding-block-end' and 'scroll-snap-padding-inline-start' + 'scroll-snap-padding-inline-end' are <a>longhands</a> of 'scroll-snap-padding', and specify the block-axis and inline-axis edges of the <a>snapport</a>, respectively.
504
504
505
505
If two values are specified, the first gives the start value and the second gives the end value.
0 commit comments