scroll-snap-align resolution assumes a positive-size snap area and snapport. Two reachable cases break that:
-
Inverted Snap port — scroll-padding add past the scrollport. E.g. 100px container, scroll-padding-top: 80px; scroll-padding-bottom: 40px
-
Inverted Snap area — negative scroll-margin values cross.
In both, start/end/center alignment is undefined: the edges the algorithm aligns to have crossed, so the resulting snap position is implementation-dependent.
Should the spec clamp degenerate snap areas/snapports to zero size (and define alignment against the collapsed edge), or define edge priority explicitly?
scroll-snap-align resolution assumes a positive-size snap area and snapport. Two reachable cases break that:
Inverted Snap port — scroll-padding add past the scrollport. E.g. 100px container, scroll-padding-top: 80px; scroll-padding-bottom: 40px
Inverted Snap area — negative scroll-margin values cross.
In both, start/end/center alignment is undefined: the edges the algorithm aligns to have crossed, so the resulting snap position is implementation-dependent.
Should the spec clamp degenerate snap areas/snapports to zero size (and define alignment against the collapsed edge), or define edge priority explicitly?