fune/testing/web-platform/tests/css/css-flexbox/table-as-item-auto-min-width.html
Morten Stenshorne 011be90291 Bug 1445931 [wpt PR 10050] - [css-flexbox] Resolve min-width:auto on table item to min preferred size., a=testonly
Automatic update from web-platform-tests[css-flexbox] Resolve min-width:auto on table item to min preferred size.

Edge and Firefox seem to let table flex items use the sizing algorithm
of the table extensively, and are therefore generally broken when it
comes to flexing tables. We, on the other hand, let the flex sizing
algorithm be in charge of sizing tables, so that flexing actually works.
However, this causes tables with a specified main size of less than the
minimum intrinsic logical width of the table to shrink below their
minimum intrinsic logical width, a situation that's generally unwanted
for tables.

Amend by ignoring the specified main size when resolving min-width:auto
on table items. Also ignore max-width/max-height. Just use the
preferred minimum logical width.

Bug: 821832
Change-Id: I78ca0c8e0041ea69bb606ff72d340bb3f5f9bb96
Reviewed-on: https://chromium-review.googlesource.com/964203
Reviewed-by: David Grogan <dgrogan@chromium.org>
Commit-Queue: Morten Stenshorne <mstensho@chromium.org>
Cr-Commit-Position: refs/heads/master@{#545777}

wpt-commits: f4388a3ab1931b8f270378e3b0598c5d8538f3cb
wpt-pr: 10050
wpt-commits: f4388a3ab1931b8f270378e3b0598c5d8538f3cb
wpt-pr: 10050
2018-04-15 08:35:53 +01:00

11 lines
700 B
HTML

<!DOCTYPE html>
<title>CSS Flexbox Test: Flex item as table, specified width less than minimum intrinsic width</title>
<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
<link rel="help" href="https://www.w3.org/TR/css-flexbox-1/#layout-algorithm" title="9. Flex Layout Algorithm">
<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; width:100px; background:red;">
<div style="display:table; width:10px; max-width:10px; height:100px; background:green;">
<div style="width:100px; height:10px; background:green;"></div>
</div>
</div>