For every unfrozen item on the line, multiply its flex shrink factor by its inner flex base size, and note this as its scaled flex shrink factor. Find the ratio of the item’s scaled flex shrink factor to the sum of the scaled flex shrink factors of all unfrozen items on the line. Set the item’s target main size to its flex base size minus a fraction of the absolute value of the remaining free space proportional to the ratio.
That is, the scaled flex shrink factor is 1 * 0px = 0px. There is a single item, so the sum of the scaled flex shrink factors is 0px. Then the ratio is 0px / 0px = NaN. Then we set the target main size to 0px - 2px * NaN = NaN * 1px.
d. Fix min/max violations
No-op, the target main size is still NaN * 1px.
e. Freeze over-flexed items
The total violation is NaN * 1px - NaN * 1px = NaN * 1px.
Therefore, we don't freeze any item.
https://drafts.csswg.org/css-flexbox/#resolve-flexible-lengths can do
0/0
withThe outer hypothetical main size is 2px, which is more that the container inner main size (0px), so we use the flex shrink factor.
That's 0px.
No-op.
That's
-2px
.No-op.
That's
-2px
We use the flex shrink factor, so
That is, the scaled flex shrink factor is
1 * 0px = 0px
. There is a single item, so the sum of the scaled flex shrink factors is0px
. Then the ratio is0px / 0px = NaN
. Then we set the target main size to0px - 2px * NaN = NaN * 1px
.No-op, the target main size is still
NaN * 1px
.The total violation is
NaN * 1px - NaN * 1px = NaN * 1px
. Therefore, we don't freeze any item.And this is an infinite cycle.