Skip to content

Commit 90c4b82

Browse files
flackrtabatkins
andauthored
[cssom-view-1] Apply scroll snap to scroll-into-view-position (#11073)
* [cssom-view-1] Apply scroll snap to scroll-into-view-position When determining the scroll into view position of an element, the UA should account for defined scroll snap positions. These are applied when scrolling due to https://www.w3.org/TR/css-scroll-snap-1/#choosing however applying them here ensures that specs using the scroll into view position are snapping aware. * Update cssom-view-1/Overview.bs --------- Co-authored-by: Tab Atkins Jr. <jackalmage@gmail.com>
1 parent ac5cd82 commit 90c4b82

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cssom-view-1/Overview.bs

+4
Original file line numberDiff line numberDiff line change
@@ -1511,6 +1511,10 @@ run the following steps:
15111511
<dt>If <var>element edge D</var> is outside <var>scrolling box edge D</var> and <var>element width</var> is less than <var>scrolling box width</var>
15121512
<dd>Align <var>element edge D</var> with <var>scrolling box edge D</var>.
15131513
</dl>
1514+
1. If <var>target</var> is an [=/Element=], and the target element defines some <a>scroll snap positions</a>,
1515+
then the user agent must <a>scroll snap</a> the resulting <var>position</var> to one of that element’s <a>scroll snap positions</a>
1516+
if its nearest <a>scroll container</a> is a <a>scroll snap container</a>.
1517+
The user agent <em>may</em> also do this even when the <a>scroll container</a> has ''scroll-snap-type: none''.
15141518
1. Return <var>position</var>.
15151519

15161520
</div>

0 commit comments

Comments
 (0)