← Back to release summary

Respect overscroll-behavior on non-scrollable scroll containers

Category
CSS
Type
No developer-visible change
Status
Proposed (Chrome Proposed)
Intent stage
None

Summary

The overscroll-behavior applies to all scroll container elements, regardless of whether those elements currently have overflowing content or are user scrollable. Developers can use overscroll-behavior to prevent scroll propagation on an `overflow: hidden` backdrop or an `overflow: auto` element without needing to consider whether it will currently be overflowing.

Motivation

Currently, in order to prevent accidental scroll propagations developers are forced to ensure there is at least a pixel of overflow in containers that wish to enforce overscroll-behavior. When they don't, the overscroll behavior unexpectly changes for the user depending on the size of their window and whether content actually overflows.

Standards & signals

Samples: https://ebidel.github.io/demos/chatbox.html https://codepen.io/rctneil/pen/rJYONj

View on chromestatus.com