For "pre-stretched" flex items with aspect ratio, use foreknowledge of definite cross size to resolve flex base size
Categories
(Core :: Layout: Flexbox, defect)
Tracking
()
People
(Reporter: dholbert, Unassigned)
References
Details
Attachments
(1 file)
182 bytes,
text/html
|
Details |
Filing this bug for the scenario that David Grogan brought up in https://github.com/web-platform-tests/wpt/pull/25754#issuecomment-698175297 .
STR:
- 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.
Reporter | ||
Updated•4 years ago
|
Updated•4 years ago
|
Reporter | ||
Comment 1•4 years ago
|
||
Turns out this was already filed as bug 1056959.
Description
•