Skip to content
This repository has been archived by the owner on May 26, 2020. It is now read-only.

Discussion on 'auto' value for ScrollDirection #16

Closed
stephenmcgruer opened this issue May 23, 2017 · 6 comments
Closed

Discussion on 'auto' value for ScrollDirection #16

stephenmcgruer opened this issue May 23, 2017 · 6 comments

Comments

@stephenmcgruer
Copy link
Collaborator

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?

@theres-waldo
Copy link
Collaborator

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.

@flackr
Copy link
Collaborator

flackr commented May 25, 2017

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.

@stephenmcgruer
Copy link
Collaborator Author

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 orientation = "block". At a later date (or spec version) 'auto' may be re-added - this should not have backwards compatibility issues as long as we keep the default for ScrollTimelineOptions as 'block'.

I will send out a PR making this change shortly.

  • birtles@, graouts@, majidvp@, and smcgruer@

@stephenmcgruer
Copy link
Collaborator Author

During the PR I am removing some related issue text. Reproducing it here for posterity:

What about a value that means, "the longest scroll direction"? That would be more reliable than "auto" for the case where layout differences could mean that, although normally you only expect the block direction to be scrollable, on some devices you end up with a small scrollable range in the inline direction too.

stephenmcgruer added a commit that referenced this issue Nov 21, 2018
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.
birtles pushed a commit that referenced this issue Nov 21, 2018
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.
@stephenmcgruer
Copy link
Collaborator Author

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.

@stephenmcgruer stephenmcgruer changed the title What is the definition of 'scrollable' for resolving orientation == 'auto'? Discussion on 'auto' value for ScrollDirection Nov 21, 2018
@birtles
Copy link
Collaborator

birtles commented Nov 21, 2018

I think it's fine to just close this issue now that we no longer have that value.

@birtles birtles closed this as completed Nov 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants