-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
… element. If the flex item is a non-replaced element and its min-width/min-height is 'auto', the spec has changed so that it has no transferred size suggestion now. https://drafts.csswg.org/css-flexbox-1/#min-size-auto This patch also updates WPT tests to fix #27878 Differential Revision: https://phabricator.services.mozilla.com/D112830 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1703304 gecko-commit: fb14e6d29a44a79efc296cc727f92aa58ea4dacc gecko-reviewers: dholbert
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,15 +2,16 @@ | |
<title>CSS aspect-ratio: Row flexbox min-width</title> | ||
<link rel="author" title="Google LLC" href="https://www.google.com/"> | ||
<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#aspect-ratio"> | ||
<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#aspect-ratio-minimum"> | ||
<link rel="help" href="https://drafts.csswg.org/css-flexbox/#min-size-auto"> | ||
<link rel="match" href="../../reference/ref-filled-green-100px-square.xht" /> | ||
|
||
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p> | ||
|
||
<div style="display: flex;"> | ||
<!-- transferred size: 100px. content size suggestion: 200px. | ||
min-width: min(100, 200). --> | ||
<div style="background: green; height: 100px; aspect-ratio: 1/1; flex-basis: 0;"> | ||
<div style="width: 200px;"></div> | ||
<!-- No transferred size suggestion since the flex item is non-replaced. | ||
Content size suggestion is 100px. --> | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
aethanyc
Author
Contributor
|
||
<div style="background: green; height: 100px; aspect-ratio: 1/2; flex-basis: 0;"> | ||
<div style="width: 100px;"></div> | ||
</div> | ||
</div> |
@aethanyc I think this test is not right. I think the content size suggestion is 50px here, not 100px.
https://drafts.csswg.org/css-flexbox/#content-size-suggestion says
https://drafts.csswg.org/css-sizing-3/#intrinsic-sizes says:
https://jsfiddle.net/dgrogan/uv59y0jh/1/ sets up the described float and shows that both Gecko and Blink give a min-content size of 50px. The
min-width: 0px; max-width: none;
in the fiddle emulates the '(and no minimum or maximum size in that axis)' part of the definition.Maybe Gecko is honoring the aspect-ratio's automatic minimum size when calculating the flex item's content size suggestion? If so, I'm pretty sure that's wrong, based on the parenthetical part of the definition and the discussion in w3c/csswg-drafts#6418.
Thoughts?