[css-snappoints] Definition of "nearest ancestor" for scroll-snap-coordinate

The Snap Points spec[1] says, for scroll-snap-coordinate:

> The scroll-snap-coordinate property is used to define the x and y coordinate within the element which will align with the nearest ancestor scroll container’s snap-destination for the respective axis.

The question is what “nearest ancestor” means here. Consider:

<div style="position: absolute;>
  <div style="overflow:scroll">
    <div style="position: absolute; scroll-snap-coordinate: 50% 50%"></div>
  </div>
</div>

Here the inner <div> doesn’t actually scroll with the scroller, because it is positioned, with its containing block is outside the scroller. So it doesn’t make sense for "scroll-snap-coordinate” to cause snapping in that intermediate scroller.

So I think “nearest ancestor” needs to actually be worded in terms of containing blocks.

Simon

[1] http://dev.w3.org/csswg/css-snappoints/#scroll-snap-coordinate

Received on Monday, 15 June 2015 19:30:28 UTC