Skip to content

Commit

Permalink
[css-flex] Change expectations of two aspect-ratio tests
Browse files Browse the repository at this point in the history
New expectations incorporate an item's min-intrinsic size as part of
flex's automatic minimum sizing.

The new expectations are arguably what the spec currently calls for AND
what the spec authors originally intended AND are consistent with both
relevant proposals in w3c/csswg-drafts#6794

Also discussed at
web-platform-tests/interop#139 (comment)

Change-Id: I3c6ecdf66fbb4ee745c88b6b2a4dbecfb9913908
  • Loading branch information
davidsgrogan authored and chromium-wpt-export-bot committed Sep 27, 2022
1 parent 2fa24e2 commit 21bce89
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions css/css-sizing/aspect-ratio/flex-aspect-ratio-002.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@

<div style="display: flex;">
<!-- No transferred size suggestion since the flex item is non-replaced.
Content size suggestion is 50px because 50px is item's min-content size. -->
Content size suggestion is 100px because min-intrinsic width is 100px.
-->
<div style="background: green; height: 100px; aspect-ratio: 1/2; flex-basis: 0;">
<div style="width: 100px;"></div>
</div>
<div style="background: green; height: 100px; width: 50px;"></div>
</div>
3 changes: 1 addition & 2 deletions css/css-sizing/aspect-ratio/flex-aspect-ratio-004.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@

<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>

<div style="background: green; width: 100px; height:50px;"></div>
<div style="display: flex; flex-direction: column;">
<!-- No transferred size suggestion since the flex item is non-replaced.
Content size suggestion is 50px because min-content size is 50px. -->
Content size suggestion is 100px because min-intrinsic height is 100px. -->
<div style="background: green; width: 100px; aspect-ratio: 2/1; flex-basis: 0;">
<div style="height: 100px;"></div>
</div>
Expand Down

0 comments on commit 21bce89

Please sign in to comment.