It seems like flex-direction: column doesn't work at all. On the other hand flex-direction: row; - works perfectly. You only need to swap "column" for "row" to see it in code below:
.flex-container {
display: flex;
flex-direction: column;
height: 400px;
background-color: DodgerBlue;
}
.flex-container>div {
flex-grow: 1;
background-color: #f1f1f1;
margin: 10px;
line-height: 75px;
}
<h1>Flexible Boxes</h1>
<div class="flex-container">
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
<div>5</div>
<div>6</div>
</div>
In column mode, display: flex behaving like regular display: block and his children flow-out of him instead of shrinking to fit height or max-height: 400px;
Why is that? And why it works only for "row" mode?