-
Notifications
You must be signed in to change notification settings - Fork 747
Description
This issue is about the height of the flex item in this case:
<div style="display: flex; flex-direction: column; width:100px; height: 0px;">
<img src="300x150.png" style="height: 100px;">
</div>
Gecko and Blink both give the flex item height 100px
. I think the current specs dictate height 50px
.
The item has 0
available height and flex-shrink: 1
. So the min-height of the item will be the item's final size.
I think all of us Gecko and Blink layout engineers agree so far. But we've had disagreement in something about what follows, so I am numbering steps for reference.
-
The min-height is
min(specified size suggestion, content size suggestion)
. specified size suggestion is clearly100px
, so min-height ismin(100px, content size suggestion)
. -
Then, content size suggestion is just the min-content height.
-
min-content height is defined to be the height of the image in this case:
<div style="height: 0px">
<img src="300x150.png" style="width: 100px; float: left; min-height: 0px; max-height: none;">
</div>
-
width:100px
in step 3 is from flex 9.8.3 saying the "automatic preferred outer cross size of any stretched flex items is the flex container’s inner cross size". The flex container's inner cross size in the original example is100px
. The flex item in the original example has an "automatic preferred outer cross size". -
Both engines give that image height
50px
. (width:100px
in a300/150
aspect ratio gives height50px
) -
So the min-content size of the image in the original example is
50px
. So the final height of the flex item in the original example ismin(100px, 50px)
which is50px
. Both engines are wrong to give height100px
.
spec authors @tabatkins @fantasai: Is 50px
wrong? Which step?
aforementioned layout engineers @aethanyc @dholbert @bfgeek @cbiesinger: Is 50px
wrong? Which step?