Discussion on 'auto' value for ScrollDirection #16
Comments
My intention was for "scrollable" in a given direction to mean "has a non-zero scroll range" in that direction. This should probably be clarified in the spec. |
I worry basing the decision on layout could lead to unpredictable behavior. e.g. A site might expect to only be inline scrollable and rely on 'auto' but on small window sizes or due to an unloaded or missing font become block scrollable as well or be loaded in too large of a window to be inline scrollable. Also, if we bind to a direction at construction #15 it would then become stuck even if it was just temporary - for example if it was still loading the content which would make it inline scrollable. |
In the monthly Animations sync today, we* decided that it is reasonable to drop this from the spec for now. We were not convinced that this has serious value for the developer. Our plan is to remove 'auto' and to make the default for ScrollTimelineOptions be I will send out a PR making this change shortly.
|
During the PR I am removing some related issue text. Reproducing it here for posterity:
|
As specced this value causes implementation difficulties around the definition of 'scrollable' and the possibility of instability in the resultant ScrollTimeline (see issues #15 and #16). For now we have resolved to just remove it, with "block" becoming the default for a ScrollTimeline.' [ci skip] Generated from: commit f566763 Author: Stephen McGruer <stephen.mcgruer@gmail.com> Date: Wed Nov 21 13:21:43 2018 -0500 Remove 'auto' value for ScrollDirection (#32) As specced this value causes implementation difficulties around the definition of 'scrollable' and the possibility of instability in the resultant ScrollTimeline (see issues #15 and #16). For now we have resolved to just remove it, with "block" becoming the default for a ScrollTimeline.
I am leaving this issue open for any future attempt to reintroduce 'auto' for ScrollDirection, but it is no longer in the spec text for now. |
I think it's fine to just close this issue now that we no longer have that value. |
This question came up during the Chromium implementation of ScrollTimeline. The definition of orientation states:
"auto
If only one direction is scrollable, selects that direction. Otherwise selects the direction along the block axis."
The definition of 'scrollable', however, is causing some disagreement. I had initially assumed that it meant that the CSS overflow property in the given axis is non-visible, however per the CSS3 box spec it is not possible to have one axis be visible and the other non-visible:
"The computed values of ‘overflow-x’ and ‘overflow-y’ are the same as their specified values, except that some combinations with ‘visible’ are not possible: if one is specified as ‘visible’ and the other is ‘scroll’ or ‘auto’, then ‘visible’ is set to ‘auto’."
What is the intended definition of 'scrollable' here?
The text was updated successfully, but these errors were encountered: