I have this HTML:
<div class="parent">
<div class="child1">
child1
</div>
<div class="child2">
<div class="child3" style="height: 100px;">
child3
</div>
</div>
</div>
and this css:
.parent {
height: 200px;
width: 200px;
display:flex;
flex-direction: column;
}
.child1 {
height: 40px;
flex: none;
}
.child2 {
display: flex;
flex-direction: column;
flex-grow: 0;
flex-shrink: 1;
flex-basis: auto;
}
child3 represents a self contained element that has a variable height.
As its height increase, I want it to stretch child2 height, but not go past parent's height, which is the parent flex container.
I have set a known height to parent here to simplify the problem, but it self depends on the rest of the page layout.
Why does it works on chrome but not IE or firefox?
illustration of the problem once child3 has grown past parent's height:
Illustration of the correct behaviour I see in chrome dev tools:
Here is the fiddle with colors to help see the problem (click the button a few times): https://jsfiddle.net/xa4tu4sr/8/
I need child3 computed height to be capped, meaning it should scroll or just have its overflow hidden.
I do not recognize this as a bug in https://github.com/philipwalton/flexbugs
Maybe it's just a flesh wound!