Closed Bug 1667466 Opened 4 years ago Closed 4 years ago

For "pre-stretched" flex items with aspect ratio, use foreknowledge of definite cross size to resolve flex base size

Categories

(Core :: Layout: Flexbox, defect)

defect

Tracking

()

RESOLVED DUPLICATE of bug 1056959

People

(Reporter: dholbert, Unassigned)

References

Details

Attachments

(1 file)

Attached file testcase 1

Filing this bug for the scenario that David Grogan brought up in https://github.com/web-platform-tests/wpt/pull/25754#issuecomment-698175297 .

STR:

  1. View attached testcase

EXPECTED RESULT:
Purple area should fill the black-bordered box.

ACTUAL RESULT:
Purple area is only 10px wide.

Summarizing David Grogan's analysis of this situation from the above-linked github issue:

When the flex item's height stretches to 100px, the height becomes definite via https://drafts.csswg.org/css-flexbox/#definite-sizes part 1, which causes the flex base size to be calculated by https://drafts.csswg.org/css-flexbox/#algo-main-item part B:

If the flex item has ...
an intrinsic aspect ratio,
a used flex basis of content, and
a definite cross size,

then the flex base size is calculated from its used cross size and the flex item’s intrinsic aspect ratio.

This should result in the flex base size being 100px (from multiplying the cross size through the aspect ratio).

Note: Chrome and Firefox both give ACTUAL RESULTS on this for now, but Chrome's got a fix that's in the works, as David Grogan notes on the github issue.

Note 2: For the purposes of brevity in this bug's summary, I'm using the term "pre-stretched" to refer to flex items that get stretched via https://drafts.csswg.org/css-flexbox/#definite-sizes part 1.

Summary: For "pre-stretched" flex items with aspect ratio, use foreknowledge of cross size to resolve flex base size → For "pre-stretched" flex items with aspect ratio, use foreknowledge of definite cross size to resolve flex base size
Severity: -- → S2

Turns out this was already filed as bug 1056959.

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: