Skip to content

Commit 4a18375

Browse files
committed
[css-snappoints] Renaming snap-area to snap-margin
1 parent 98e87a3 commit 4a18375

2 files changed

Lines changed: 75 additions & 112 deletions

File tree

css-snappoints/Overview.bs

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ Ignored Terms: scroll-snap-positions-*, containing block chain
102102

103103
<figcaption>
104104
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).
106106
</figcaption>
107107
</figure>
108108
</div>
@@ -124,7 +124,7 @@ Ignored Terms: scroll-snap-positions-*, containing block chain
124124
width: 500px;
125125
overflow-x: hidden;
126126
overflow-y: auto;
127-
/* Specifies that each element's snap area should
127+
/* Specifies that each element's snap margin should
128128
align with a 100px offset from the top edge. */
129129
scroll-snap-padding: 100px 0 0;
130130
/* Encourages scrolling to end at a snap position when the
@@ -147,7 +147,7 @@ Ignored Terms: scroll-snap-positions-*, containing block chain
147147

148148
<figcaption>
149149
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).
151151
</figcaption>
152152
</figure>
153153
</div>
@@ -164,7 +164,7 @@ Ignored Terms: scroll-snap-positions-*, containing block chain
164164

165165
Valid <a>snap positions</a> can be specified
166166
as a particular alignment ('scroll-snap-align')
167-
of an element's <a>scroll snap area</a> ('scroll-snap-area', defaulting to its margin box)
167+
of an element's <a>scroll snap margin</a> ('scroll-snap-margin', defaulting to its margin box)
168168
within the <a>scroll container</a>’s <a>snap alignment container</a>
169169
(the rectangle obtained by reducing its visual viewport by its 'scroll-snap-padding').
170170
This is conceptually equivalent to specifying the alignment of
@@ -188,9 +188,9 @@ Ignored Terms: scroll-snap-positions-*, containing block chain
188188
A scroll container's snap alignment container is the rectangle obtained by reducing its visual viewport by its 'scroll-snap-padding'.
189189
<p class="issue">Better name for this concept?</p>
190190

191-
<dt><dfn lt="scroll snap area" local-lt="snap area" export>snap area</dfn>
191+
<dt><dfn lt="scroll snap margin" local-lt="snap margin" export>snap margin</dfn>
192192
<dd>
193-
An element's snap area is the rectangle obtained by expanding its border box by its 'scroll-snap-area'.
193+
An element's snap margin is the rectangle obtained by expanding its border box by its 'scroll-snap-margin'.
194194

195195
<dt><dfn lt="scroll snap position" local-lt="snap position" export>snap position</dfn>
196196
<dd>
@@ -259,12 +259,12 @@ Ignored Terms: scroll-snap-positions-*, containing block chain
259259

260260
This property is a shorthand property that sets all of the 'scroll-snap-padding-*' longhands in one declaration.
261261

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>
263263

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.
265265

266266
<pre class="propdef">
267-
Name: scroll-snap-area
267+
Name: scroll-snap-margin
268268
Value: <<length>>{1,4}
269269
Initial: 0
270270
Applies to: all elements
@@ -275,19 +275,19 @@ Ignored Terms: scroll-snap-positions-*, containing block chain
275275
Animatable: yes
276276
</pre>
277277

278-
<dl dfn-type=value dfn-for="scroll-snap-area">
278+
<dl dfn-type=value dfn-for="scroll-snap-margin">
279279
<dt><dfn><<length>>{1,4}</dfn>
280280
<dd>
281-
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.
282282

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.
284284
</dl>
285285

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.
287287

288288
<h2 id="scroll-snap-align">Scroll Snap Align: the 'scroll-snap-align' property</h2>
289289

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.
291291

292292
<p class="issue">
293293
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).
@@ -312,15 +312,15 @@ Ignored Terms: scroll-snap-positions-*, containing block chain
312312

313313
<dt><dfn>start</dfn>
314314
<dd>
315-
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.
316316

317317
<dt><dfn>end</dfn>
318318
<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.
320320

321321
<dt><dfn>center</dfn>
322322
<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.
324324
</dl>
325325

326326
<h2 class=no-num id="acknowledgments">Acknowledgments</h2>

0 commit comments

Comments
 (0)