From 823162301f1c9990da53c16b71f0eec5cdfe8494 Mon Sep 17 00:00:00 2001 From: Robert Flack Date: Tue, 22 Oct 2024 10:33:57 -0400 Subject: [PATCH] [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. --- cssom-view-1/Overview.bs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cssom-view-1/Overview.bs b/cssom-view-1/Overview.bs index 32d65ef3041..c394ce283b2 100644 --- a/cssom-view-1/Overview.bs +++ b/cssom-view-1/Overview.bs @@ -1496,6 +1496,10 @@ run the following steps:
If element edge D is outside scrolling box edge D and element width is less than scrolling box width
Align element edge D with scrolling box edge D. + 1. If target is an Element, and the target element defines some scroll snap positions, + then the user agent must scroll snap the resulting position to one of that element’s scroll snap positions + if its nearest scroll container is a scroll snap container. + The user agent may also do this even when the scroll container has ''scroll-snap-type: none''. 1. Return position.