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 targets (w3c#11318)
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
+12Lines changed: 12 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -310,6 +310,18 @@ Selecting The Active Scroll Marker: the '':target-current'' pseudo-class</h4>
310
310
1. For each <var>axis</var> of |primary|, followed by |secondary|:
311
311
1. Let <var>scrollport size</var> be the client size of |scroller| in the dimension |axis|.
312
312
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|.
313
+
1. Let <var>scroll size</var> be the length of the <a>scrollable overflow area</a> of the |scroller| in the dimension |axis|.
314
+
1. Let <var>scroll range</var> be <code>|scroll size| - |scrollport size|</code>.
315
+
1. If |scroll range| is greater than 0, redistribute unreachable target positions:
316
+
1. Let <var>distribute range</var> be <code>min(1/8 * |scrollport size|, |scroll range| / 2)</code>.
317
+
1. Let <var>before targets</var> be all |targets| whose associated |target position| is less than <code>|distribute range|</code>.
318
+
1. Let <var>minimum position</var> be the minimum |target position| of |before targets|.
319
+
1. Update the associated |target position| of each target in |before targets| to
0 commit comments