Skip to content

Commit 5f1e329

Browse files
committed
[css-snappoints] Snap-alignment should be in the element section
1 parent 9f68e76 commit 5f1e329

2 files changed

Lines changed: 78 additions & 78 deletions

File tree

css-snappoints/Overview.bs

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -259,9 +259,37 @@ Issue: <b>This spec is currently undergoing major changes in line with the resol
259259

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

262-
<h3 id="scroll-snap-align">Scroll Snap Align: the 'scroll-snap-align' property</h3>
262+
<h2 id="properties-on-the-elements">Properties on the elements</h2>
263+
264+
<h3 id="scroll-snap-margin">Scroll Snap Margin: the 'scroll-snap-margin' property</h3>
265+
266+
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.
267+
268+
<pre class="propdef">
269+
Name: scroll-snap-margin
270+
Value: <<length>>{1,4}
271+
Initial: 0
272+
Applies to: all elements
273+
Inherited: no
274+
Percentages: n/a
275+
Media: interactive
276+
Computed value: as specified, with lengths made absolute
277+
Animatable: yes
278+
</pre>
279+
280+
<dl dfn-type=value dfn-for="scroll-snap-margin">
281+
<dt><dfn><<length>>{1,4}</dfn>
282+
<dd>
283+
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.
284+
285+
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.
286+
</dl>
287+
288+
This property is a shorthand property that sets all of the 'scroll-snap-margin-*' longhands in one declaration.
289+
290+
<h3 id="scroll-snap-align">Scroll Snap Alignment: the 'scroll-snap-align' property</h3>
263291

264-
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.
292+
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.
265293

266294
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).
267295

@@ -295,34 +323,6 @@ Issue: <b>This spec is currently undergoing major changes in line with the resol
295323
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.
296324
</dl>
297325

298-
<h2 id="properties-on-the-elements">Properties on the elements</h2>
299-
300-
<h3 id="scroll-snap-margin">Scroll Snap Margin: the 'scroll-snap-margin' property</h3>
301-
302-
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.
303-
304-
<pre class="propdef">
305-
Name: scroll-snap-margin
306-
Value: <<length>>{1,4}
307-
Initial: 0
308-
Applies to: all elements
309-
Inherited: no
310-
Percentages: n/a
311-
Media: interactive
312-
Computed value: as specified, with lengths made absolute
313-
Animatable: yes
314-
</pre>
315-
316-
<dl dfn-type=value dfn-for="scroll-snap-margin">
317-
<dt><dfn><<length>>{1,4}</dfn>
318-
<dd>
319-
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.
320-
321-
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.
322-
</dl>
323-
324-
This property is a shorthand property that sets all of the 'scroll-snap-margin-*' longhands in one declaration.
325-
326326
<h2 class=no-num id="acknowledgments">Acknowledgments</h2>
327327

328328
Many thanks to lots of people for their proposals and recommendations, some of which are incorporated into this document.

0 commit comments

Comments
 (0)