Closed Bug 1279276 Opened 5 years ago Closed 2 years ago

[css-flexbox] Percentages should not be resolved against an auto flex-basis

Categories

(Core :: Layout, defect, P3)

defect

Tracking

()

RESOLVED INVALID
Tracking Status
firefox50 --- affected

People

(Reporter: Biesinger, Unassigned)

References

()

Details

See URL -- the 50% height should be ignored, so the div should have a height of 50px. In other words, it should look like one long green div and not two green divs of different sizes.

Ref: https://drafts.csswg.org/css-flexbox/#definite-sizes
If a flex item has a definite flex basis and the flex container has a definite main size, its post-flexing main size is treated as definite (even though it might technically rely on the sizes of indefinite siblings to resolve its flexed main size).


[Unlike the other bugs I that I resolved as invalid, this one is in the main axis and does not use stretch.]
Priority: -- → P3

I think this is essentially the same as bug 1092007.

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1092007

Actually, the spec changed since this bug was filed, such that our rendering here is now what the spec calls for.

The new spec text:

2. If the flex container has a definite main size,
a flex item’s post-flexing main size is treated as definite,
even though it can rely on the indefinite sizes of any
flex items in the same line. 

https://drafts.csswg.org/css-flexbox/#definite-sizes

In this bug's testcase, the flex container does indeed have a definite main size (300px):

<div class="flexbox column" style="height: 300px;">

So the post-flexing size of its child (the flex item) is considered definite, and the percent height on the item's child should not be ignored.

Resolution: DUPLICATE → INVALID
You need to log in before you can comment on or make changes to this bug.