You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[css-overflow-5] Allow scroll to target unreachable scroll marker target positions.
This adds to the non-normative suggested algorithm for selecting the active scroll marker
the proposed compromise in w3c#11165 to ensure that scrolling from start to end scrolls
through all of the markers in that scroller.
Copy file name to clipboardExpand all lines: css-overflow-5/Overview.bs
+13-1
Original file line number
Diff line number
Diff line change
@@ -301,13 +301,25 @@ Selecting The Active Scroll Marker: the '':target-current'' pseudo-class</h4>
301
301
1. While |active| is a [=scroll container=] containing [=scroll target=] elements targeted by |group|:
302
302
1. Let <var>scroller</var> be |active|.
303
303
1. Let <var>targets</var> be the set of the [=scroll target=] elements whose nearest ancestor [=scroll container=] is |scroller|
304
-
and the [=scroll container=] elements which contain [=scroll target=] elements targeted by the [=scroll marker group=] whose nearest ancestor [=scroll container=] is |scroller|.
304
+
and the [=scroll container=] elements which contain [=scroll target=] elements targeted by the [=scroll marker group=] whose nearest ancestor [=scroll container=] is |scroller|.
305
305
1. Let <var>primary</var> be the primary scrolling axis, assumed to be the block direction of the container's writing-mode.
306
306
1. Let <var>secondary</var> be the scrolling axis perpendicular to primary.
307
307
1. Let <var>position</var> be the 'eventual scroll position' considering ongoing scrolling operations.
308
308
1. For each <var>axis</var> of |primary|, followed by |secondary|:
309
309
1. Let <var>scrollport size</var> be the client size of |scroller| in the dimension |axis|.
310
310
1. For each |target| in |targets|, <a>determine the scroll-into-view position</a> of |target| in |axis|, storing this as the associated |target position| of |target|.
311
+
1. Let <var>scroll size</var> be the length of the <a>scrollable overflow area</a> of the |scroller| in the dimension |axis|.
312
+
1. Let <var>scroll range</var> be <code>|scroll size| - |scrollport size|</code>.
313
+
1. If |scroll range| is greater than 0, redistribute unreachable target positions:
314
+
1. Let <var>distribute range</var> be <code>min(1/8 * |scrollport size|, |scroll range| / 2)</code>.
315
+
1. Let <var>before targets</var> be all |targets| whose associated |target position| is less than <code>|distribute range|</code>.
316
+
1. Let <var>minimum position</var> be the minimum |target position| of |before targets|.
317
+
1. Update the associated |target position| of each target in |before targets| to
0 commit comments