I need to stretch yellow child to fill all height of parent. Without setting parent height. Height of parent should be dependent on blue child text. https://jsfiddle.net
If I understood correctly, you are looking for the align-items property, which defines the layout along the cross axis, in this case vertically.
You can find a good overview here: https://css-tricks.com/snippets/css/a-guide-to-flexbox/
.flexbox {
display: flex;
flex-direction: row;
justify-content: center;
align-items: stretch; // <-- stretch vertical (default value, can be omitted here)
align-content: center;
}
.box {
padding: 1em;
text-align: center;
margin: 1em;
}
.box--yellow {
background-color: yellow;
}
.box--blue {
background-color: blue;
color: white;
}
yellow
some
cool
text