I have a flexbox container with two items. In each item, there is an image with max-width: 100% and max-height: 100% Firefox expands the items, so that they fill the entire container, as if I had set "flex: auto" or "flex-grow: 1" to the items :
I would like to have the same behaviour than in Chrome :
Is it possible ?
.container {
height: 400px;
display: flex;
}
img {
max-width: 100%;
max-height: 100%;
}
<div class="container">
<div style="background-color:gainsboro">
<img src="https://source.unsplash.com/random/900×700/?fruit" alt="">
</div>
<div style="background-color: chocolate;">
<img src="https://source.unsplash.com/random/900×700/?flower" alt="">
</div>
</div>