fune/testing/web-platform/tests/css/css-grid/empty-grid-within-flexbox.html
Ethan Jimenez dbd660544e Bug 1730311 [wpt PR 30571] - [GridNG] Fix negative size of an empty grid, a=testonly
Automatic update from web-platform-tests
[GridNG] Fix negative size of an empty grid

Fixing a bug where an empty grid, with no explicit tracks defined and no
placed grid items, incorrectly resolved a negative inline size due to
its tracks being sized to 0 and having a positive gutter size.

Bug: 1246609
Change-Id: I11476a2f819cd4571d1b98c8ed4320ca3af54661
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3153717
Commit-Queue: Ethan Jimenez <ethavar@microsoft.com>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/main@{#920574}

--

wpt-commits: 43ef57c6f626b7af5fc3cd5cfbb442ee33607f16
wpt-pr: 30571
2021-09-29 09:24:03 +00:00

33 lines
906 B
HTML

<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: Sizing of an empty grid within a flexbox</title>
<link rel="author" title="Ethan Jimenez" href="mailto:ethavar@microsoft.com"/>
<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1246609">
<link rel="match" href="../reference/ref-filled-green-100px-square.xht">
<meta name="assert" content="Checks that the intrisic sizes of an empty grid are correctly computed.">
<style>
.flex {
display: flex;
width: 100px;
height: 100px;
background-color: red;
}
.flex-item {
width: 50px;
background-color: green;
}
.empty-grid {
display: grid;
grid-gap: 50px;
}
</style>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div class="flex">
<div class="flex-item"></div>
<div class="empty-grid"></div>
<div class="flex-item"></div>
</div>