DEV Community

Discussion on: Auto-sizing element to fit inside flexbox

Collapse
 
afif profile image
Temani Afif

It's more logical to use min-height:0 instead of overflow: auto. What you face is due to the default min-height/min-width setting applied by flexbox: w3.org/TR/css-flexbox-1/#min-size-...

overflow:auto will also disable the automatic minimum (w3.org/TR/css-flexbox-1/#change-20...) size but it's more suitable when you want to have a scrollbar.

Collapse
 
valyouw profile image
Yuval

Thanks!