fune/testing/web-platform/tests/css/css-flexbox/flex-minimum-height-flex-items-024.html
David Grogan 772061a467 Bug 1642264 [wpt PR 23886] - [FlexNG] Treat specified intrinsic block size as auto for min-size: auto, a=testonly
Automatic update from web-platform-tests
[FlexNG] Treat specified intrinsic block size as auto for min-size: auto

Previously FlexNG would give the item in this example min-height: 0, not
whatever the min-size: auto algorithm dictated.

<div style="display: flex; flex-direction: column">
  <div style="min-height: min-content">
    ...

There's still a behavior difference from legacy flex containers because
they honor min-height: min-content[1]. NG always treats them as auto[2],
flex-minimum-height-flex-items-023.html demonstrates this. Looks like
this case already differs between Firefox and legacy, so hopefully
compat problems between FlexNG and legacy are few. It's still
unfortunate to introduce a third behavior for this case, even if the new
behavior is spec compliant.

[1] https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/core/layout/layout_box.cc;l=4039;drc=feef24515266f41efe38da79056a216a8ae9d459
[2] https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/core/layout/ng/ng_length_utils.cc;l=74;drc=feef24515266f41efe38da79056a216a8ae9d459

Bug: 1088223
Change-Id: I17f5f5dd55b159da04e9693c0992c9a635862eb1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2224599
Commit-Queue: David Grogan <dgrogan@chromium.org>
Reviewed-by: Christian Biesinger <cbiesinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#774967}

--

wpt-commits: 265d93de89004a0670cada12b1de5cc49157659b
wpt-pr: 23886
2020-06-12 09:18:37 +00:00

18 lines
918 B
HTML

<!DOCTYPE html>
<title>Flex minimum height with intrinsic min-height specified</title>
<link rel="author" title="dgrogan@chromium.org" href="mailto:dgrogan@chromium.org" />
<link rel="help" href="https://drafts.csswg.org/css-flexbox/#min-size-auto" />
<link rel="help" href="https://drafts.csswg.org/css-sizing-3/#valdef-width-min-content" />
<link rel="match" href="../reference/ref-filled-green-100px-square-only.html" />
<link rel="bookmark" href="https://crbug.com/1088223">
<meta name="assert" content="Flex uses automatic minimum sizes when item specifies min-height:intrinsic, because that is treated as auto.">
<p>Test passes if there is a filled green square.</p>
<div style="display: flex; flex-direction: column;">
<div style="display: flex; flex-basis: 0; min-height: min-content;">
<div style="background: green;">
<div style="height: 100px; width: 100px;"></div>
</div>
</div>
</div>