why can't an flex-item just get the height of the flex-container until specifically added

soo i have a flex container with items & i want to set the parent container to be min-height:24rem & the flex-item's height be height 100% but it doesn't do anything until i manually set the height on the parent one solution is to keep inheriting from parent to childrent like
.parent{
min-height:24rem;
}
.children{
min-heigth:inherit;
}
.parent{
min-height:24rem;
}
.children{
min-heigth:inherit;
}
but what if i'm in 3 lvls deep & why doesn't it just get it, compute the height and get the value of it calc 100%
2 Replies
Jochem
Jochem2d ago
it's annoying, but min-height doesn't set an explicit height for the parent element, so it can't use percentages to calculate the size of the child element
Dev_HK
Dev_HKOP2d ago
so bunch of inherits; i see or make it a variable i guess & just recalculating that anyway thank you

Did you find this page helpful?