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/tentative/item-placement/dense-packing/column-dense-packing-002.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html>
<link rel="match" href="column-dense-packing-002-ref.html">
<link rel="author" title="Celeste Pan" href="mailto:celestepan@microsoft.com">
<style>
.grid-lanes {
display: grid-lanes;
background: gray;
item-tolerance: 0;
grid-template-columns: repeat(3, 50px);
padding: 10px;
grid-auto-flow: dense;
}
</style>
<body>
<p>Ensure that dense-packing places items correctly based on the auto-placement cursor location when there are multiple gaps. Item 5 should go into the right-most gap.</p>
<div class="grid-lanes">
<div style="background: lightskyblue; height: 20px;" >
1
</div>
<div style="background: lightcoral; height: 60px;" >
2
</div>
<div style="background: lightgreen; height: 20px;">
3
</div>
<div style="background: brown; height: 10px; grid-column: span 3;">
4
</div>
<div style="background:orchid; height: 10px; grid-column: span 2;">
5
</div>
<div style="background: red; height: 40px;">
6
</div>
</div>
</body>
</html>