W3C home > Mailing lists > Public > www-style@w3.org > December 2015

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

From: Sebastian Zartner <sebastianzartner@gmail.com>
Date: Sun, 13 Dec 2015 23:10:32 +0100
Message-ID: <CAERejNYoC9ci5JV2uzzx_rYMgvSCvXKSNuVheVKvB4ATU-cRig@mail.gmail.com>
To: www-style list <www-style@w3.org>
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.

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

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:59 UTC