[css-scroll-snap] Add property to define 'proximity'

Currently the description for the value 'proximity' lets it up to the
UA to determine when snapping should happen.

Though there may be some situations in which an author wants to
specify the distance at which the element is snapped by himself.

E.g. taking the example of cities in a map, it should be possible to
define how far away from a city the viewport should be snapped to it.

This property could be called 'scroll-snap-distance' and may have the
following syntax:

scroll-snap-distance: auto | <length>{1,2}

Where <length> defines the absolute block and inline distances. If
only one value is given, it refers to both axises.
A third possible value may be <percentage>, which would define the
distance(s) relative to the block or inline size of the viewport or
scroll container. Though I'm not sure whether that is needed.

Sebastian

Received on Sunday, 13 December 2015 22:11:19 UTC