I’m really confused with how flex-shrink works in this code:
<style>
#box-container {
display: flex;
height: 500px;
}
#box-1 {
background-color: dodgerblue;
width: 100%;
height: 200px;
flex-shrink: 1;
}
#box-2 {
background-color: orangered;
width: 100%;
height: 200px;
flex-shrink: 2;
}
</style>
<div id="box-container">
<div id="box-1"></div>
<div id="box-2"></div>
</div>
how is it possible for flex-shrink to work when both box-1 and box-2 have enough space, and while the flex-container is not smaller then the combined width of the flex-items, box-1 and box-2.
I thought that flex-items only shrink when the flex-containers width is smaller then the compined width of the flex-items within it.
Thanks for reading