demo · v140
Propagation Chain
Set overscroll-behavior on html AND on body AND on a nested scroll container. The propagation rules say the value propagates from the root to the viewport unless body sets one. Tabulator below shows what the viewport ends up with.
<html>root
<body>pre-140 the propagation source
.scrollernested container
Pre-140: the engine looked at body first, then fell back to a default of auto at the viewport. html was ignored. Post-140: the engine looks at html, propagates to the viewport, and body is just like any other element.
/* Recommended in 140+ */
html { overscroll-behavior: contain; } /* propagates to viewport */
body { overscroll-behavior: auto; } /* irrelevant */
.scroller { overscroll-behavior: auto; } /* nested container, decoupled */
see also
- Viewport overscroll propagation — feature index
- ChromeStatus