There are common circumstances in which
scroll markers will target elements
whose scroll aligned positions cannot be uniquely reached in the scrolling container.
As an example, consider the following scrolling container whose items have scroll-snap-align: center;
The furthest left that this scroller can scroll has item 4 closest to its scroll aligned position. This means that in the initial scroll position, at a scroll offset 0, item 4 is the one that would be active. Similarly when you reach the end of the scroller, the 4th last item would be active.
Alternately, we could spec that item 0 is active in the initial position, and the last item in the end position. However, this this just creates a jump in the active marker as soon as you start scrolling:
None of these behaviors seem ideal, so let's explore some options for improving the situation.
If the scroll aligned position of some items falls outside of the scrollable range, extend that scrollable range virtually to allow aligning those items.
Or by allowing scrolling beyond the normally scrollable range to be able to align those items:
We could distribute the selected marker proportionally between the marker locations. They wouldn't be aligned when active but you would be able to reach all markers.
We could distribute the scroll positions leading up to the first alignable item between the markers leading up to it, and do similarly for the items following the last alignable item.
However, if the first alignable item is a tiny distance away this will still likely result in a jump at the start.
Similar to the previous option, however we distribute the scroll up to the first half-page of non-alignable items. This prevents from ever having a sudden jump but means that there may be alignable items at the start / end which are not active when aligned.