CSS property to stop body scrolling when at limits of internal scrolling div?

CSS property to stop body scrolling when at limits of internal scrolling div?

Adam

Mr. Webwide
Administrator
Local time
17:15
Joined
Sep 24, 2019
Messages
1,256
Pronouns
he/him

I am sure I saw somebody tweet this. A possibly new CSS property that when scrolling in a scrollable container in the content that when reaching the top/bottom it did not continue to scroll the body as is default.

Not scroll-snap or scroll-behaviour. I am trawling caniuse, MDN and Google with no luck.

Am I going mad?

 

Adam

Mr. Webwide
Administrator
Local time
17:15
Joined
Sep 24, 2019
Messages
1,256
Pronouns
he/him

Found it! The behaviour is called scroll chaining and the property is called overflow-behaviour.


 
Last edited:

Gummibeer

Astroneer
Moderator
Local time
18:15
Joined
Oct 5, 2019
Messages
1,167
Pronouns
he/him

Happy you found it. Even if I'm still like 🥴🤯
My inner question mark started growing with CSS. 😅
But good to learn some new CSS things. It seems to get better and better - or is it one of these CSS1 things no one uses? 🤔

 
Top