Skip to content

[cssom-view] New feature - scroll-boundary-behavior (an extension of -ms-scroll-chaining) #769

@majido

Description

@majido

We are proposing standardization of "-ms-scroll-chaining" with some modification. The details of the proposal can be found in this WICG where it is being incubated but here is the executive summary of proposed feature:

scroll-boundary-behavior: propagate | contain | none

  • propagate: propagate scroll to the parent scroller. If there is no parent scroller (e.g., viewport) user-agent may perform a default action (e.g. navigation) or show any appropriate overscroll UI affordance. This is the default value.
  • contain: do not propoagate. The user agent may show an appropriate overscroll UI affordance such as glow/bounce etc.
  • none: same as contain but also prevents any overscroll UI affordance e.g. bounce or glow.
    There will be scroll-boundary-behavior-{x,y} long-hands too.

Here are the differences compared to existing -ms-scroll-chaining which is fairly limited in functionality:

  1. Applies to all user scrolls (not just touch/touchpad)
  2. Per axis control (matching overflow-{x,y})
  3. Meaningful and useful definition of chaining behavior at viewport level
  4. Additional control over bounce/glow affordances

I think CSSOM View is probably the right spec to host this new attribute as it provides an API to control certain aspects of scrolling (similar to scroll-behavior in this respect).

There is some agreement on WICG that the proposed changes are reasonable and useful. So if you think this is the right spec to standardize I can start working on a pull request with appropriate changes to make the proposal more concrete. Any feedback on functionality and naming is also very welcome and appreciated.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions