Skip to content

Commit ecdd8ea

Browse files
committed
[css-snappoints] Adding scroll-snap-area. Included mechanism to specify box which I think was just accidentally omitted from the alternate proposal since there is prose referring to a specified box.
1 parent 331155d commit ecdd8ea

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

css-snappoints/Overview.src.html

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ <h2 id="definitions">Definitions</h2>
170170

171171
<h2 id="scroll-snap-type">Scroll Snap Types: the 'scroll-snap-type' property</h2>
172172

173-
The ''scroll-snap-type'' property is used to define how strictly a <a>scroll container's</a> visual viewport should rest on <a>snap positions</a>. It intentionally does not specify nor mandate any precise animations or physics used to enforce those snap points; this is left up to the user agent.
173+
The ''scroll-snap-type'' property defines how strictly a <a>scroll container's</a> visual viewport should rest on <a>snap positions</a>. It intentionally does not specify nor mandate any precise animations or physics used to enforce those snap points; this is left up to the user agent.
174174

175175
<pre class='propdef'>
176176
Name: scroll-snap-type
@@ -198,6 +198,30 @@ <h2 id="scroll-snap-type">Scroll Snap Types: the 'scroll-snap-type' property</h2
198198
The visual viewport of this <a>scroll container</a> may come to rest on a snap position at the termination of a scroll at the discretion of the UA given the parameters of the scroll. If the content changes such that the visual viewport would no longer rest on a snap position (e.g. content is added, moved, deleted, resized), the scroll offset may be modified to maintain this guarantee.
199199
</dl>
200200

201+
<h2 id="scroll-snap-area">Scroll Snap Area: the 'scroll-snap-area' property</h2>
202+
203+
The 'scroll-snap-area' property defines a region for an element which will be used in calculating <a>snap positions</a> for its ancestor scroll container.
204+
205+
<pre class="propdef">
206+
Name: scroll-snap-area
207+
Value: [ border-box | margin-box ]? <<length>>{1,4}
208+
Initial: 0
209+
Applies to: all elements
210+
Inherited: no
211+
Percentages: relative to the specified element box
212+
Media: interactive
213+
Computed value: specified value, with lengths made absolute
214+
Animatable: yes
215+
</pre>
216+
217+
<dl dfn-type=value dfn-for="scroll-snap-area">
218+
<dt><dfn>[ border-box | margin-box ]? <<length>>{1,4}</dfn>
219+
<dd>
220+
Specifies the outset of the element's snap area from the axis-aligned bounding box of the transformed specified box, in the <a>scroll container's</a> coordinate space. Outsets are applied to this bounding box, not the specified box. If the box argument is omitted it defaults to border-box.
221+
222+
Note: This ensures that the scroll snap area is always rectangular and axis-aligned to the <a>scroll container's</a> coordinate space.
223+
</dl>
224+
201225
<h2 id="scroll-snap-destination">Scroll Snap Destination: the 'scroll-snap-destination' property</h2>
202226

203227
The 'scroll-snap-destination' property is used to define the x and y coordinate within the <a>scroll container's</a> visual viewport

0 commit comments

Comments
 (0)