<!DOCTYPE html>
<html>
<head>
<style>
div {
margin: 15px;
padding: 3px;
border: solid black 1px;
overflow: hidden auto;
}
#flex-container {
display: flex;
flex-wrap: wrap;
background-color: rgb(197, 255, 236);
height: 300px;
}
#flex-container > div {
flex: 1;
height: 150px;
}
#flex-container > div > p {
inline-size: 300px;
}
#pinkDiv {
background-color: rgb(255, 205, 213);
writing-mode: vertical-rl;
}
#yellowDiv {
background-color: rgb(255, 255, 161);
writing-mode: vertical-rl;
overscroll-behavior-inline: contain;
}
</style>
</head>
<body>
<h1>Try right box with no overscroll chaining in the inline-direction</h1>
<p>The writing-mode property value 'vertical-rl' changes inline-direction from the x-axis to the y-axis, so now the overscroll-behavior-inline works in the y-direction instead of the x-direction.</p>
<p>Put the mouse pointer over the left pink box, scroll down to the bottom of it, continue scrolling, and the scrolling behavior will transfer to the green parent element. This is called overscroll chaining, when overscrolling in one element leads to scrolling behavior in the parent element. Scroll chaining is default behavior.</p>
<p><strong>Note: </strong>You might need to move the mouse pointer a little bit inside the pink box after scrolling down to transfer scrolling behavior to the green parent element.</p>
<p>Now, scroll to the top again, move mouse pointer over to the yellow box to the right, scroll down to the bottom of it, continue scrolling, and you will see that scrolling is NOT transferred to the parent element in this case, bacause of the overscroll-behavior-inline property value 'contain' that prevents this from happening.</p>
<div id="flex-container">
<div id="pinkDiv">