Please take a look at this simple example: https://jsfiddle.net/2xa8L8wL/16/
HTML
<p>A, B, C are all flex columns.</p>
<p>In Chrome, B's height is limited by its parent A.</p>
<p>In Firefox, B's height is expanded by its child C.</p>
<a>
A (height: 100px)
<b>
B (height: auto)
<c>
C (height: 200px)
</c>
</b>
</a>
CSS
a, b, c {
display: flex;
flex-direction: column;
margin: 10px;
}
a {
background-color: red;
height: 150px;
}
b {
background-color: orange;
height: auto;
}
c {
background-color: yellow;
height: 200px;
}
- There are three flex columns A, B, and C.
- A is parent of B
- B is parent of C.
- A has height: 100px;
- B has height: auto;
- C has height: 200px;
Then what should be B's height?
Should B's height be bound by its parent A's height, or should B's height expand to contain C's height?
This renders differently in different browsers. Can someone who is familiar with the Flexbox spec tell me which is the correct behavior? Or neither?