Open Bug 1454069 Opened 6 years ago Updated 2 years ago

[css-flexbox] Ensure we treat used "flex-basis:<percentage>" like flex-basis:content when flex container has indefinite size

Categories

(Core :: Layout, enhancement, P3)

enhancement

Tracking

()

ASSIGNED

People

(Reporter: dholbert, Assigned: dholbert)

References

Details

Attachments

(1 file)

Per https://drafts.csswg.org/css-flexbox-1/#valdef-flex-basis-auto :

# ...percentage values of flex-basis are resolved against
# the flex item’s containing block (i.e. its flex
# container); and if that containing block’s size is
# indefinite, the used value for 'flex-basis' is 'content'.
https://drafts.csswg.org/css-flexbox-1/#propdef-flex-basis

I'm filing this to be sure that this is how we actually behave for these indefinite-CB-with-percent-[used]-flex-basis scenarios.  A quick local test suggests that we do.  We should add a reftest (or a few) for this, too.
Attached file testcase 1
Here's an initial testcase, using "flex-basis: auto" and a percent height.

The flex items here all have a teal border, and the fact that they shrinkwrap their content-height is a sign that we're doing the right thing.
Priority: -- → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: