In the codepen I am trying to fill the height of parent if child height is less than the parent or overflow the children if their height exceeds that of the parent. But when I hardcode child height, I expect a scrollbar. But instead, the children are just filling the parent.
html,body{
height:100%;
}
.grand-parent{
height:100%;
overflow:auto;
display:flex;
}
.parent{
display:flex;
flex-direction:column;
min-height:100%;
width:300px;
}
.child{
height:1500px;
width:100%;
display:flex;
}
.green{
background:green;
}
.blue{
background:blue;
}
<div class="grand-parent">
<div class="parent">
<div class="child green"></div>
<div class="child blue"></div>
</div>
</div>