Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-grid/grid-lanes/item-placement/dense-packing/column-dense-packing-flow-tolerance-001.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html>
<link rel="match" href="column-dense-packing-flow-tolerance-001-ref.html">
<link rel="author" title="Celeste Pan" href="mailto:celestepan@microsoft.com">
<style>
html, body {
font: 15px/1 monospace;
margin: 0;
}
.grid-lanes {
display: grid-lanes;
grid-template-columns: repeat(4, 100px);
gap: 20px;
flow-tolerance: 20px;
grid-auto-flow: dense;
grid-lanes-pack: dense;
}
</style>
<body>
<p>Ensure that dense-packing honors flow-tolerance. An item may be packed into an earlier-in-flow track whose running position is within the flow-tolerance of the highest eligible opening. The second pink item (Item 4a) should stack under Item 1 in the first column, not in the last column.</p>
<div class="grid-lanes">
<div style="background: lightblue; height: 90px;">Item 1</div>
<div style="background: lightgreen; height: 180px;">Item 2</div>
<div style="background: lightgray; height: 80px;">Item 3</div>
<div style="background: pink; height: 70px;">Item 4</div>
<div style="background: pink; height: 70px;">Item 4a</div>
<div style="background: yellow;">Item 5</div>
</div>
</body>
</html>