Closed
Description
https://drafts.csswg.org/css-flexbox/#definite-sizes
Currently, a main size is only made definite if the flex container has a definite height.
However, browsers do not quite implement that. See https://crbug.com/1003506 for some discussion, but basically:
<div style="display: flex; flex-direction: column; width: 100px; background: yellow;">
<div style="height: 100px; flex: 1 1 auto; background: green; min-height: 0;">
<div style="height: 100%; background: red;"></div>
</div>
</div>
An element that would have a definite height outside of flex now suddenly has an indefinite height when put in a flexbox, because it's flexible (at least according to the spec, not in impls).
- Should that change?
- Would implementing this spec-compliant be web-compatible?
Also note that Chrome currently resolves percentages only if the main size property is definite; a definite flex-basis is not enough. That should probably be changed.