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/row-dense-packing-002.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html>
<link rel="match" href="row-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;
masonry-direction: row;
grid-template-rows: 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 bottom-most gap.</p>
<div class="grid-lanes">
<div style="background: lightskyblue; width: 20px;" >
1
</div>
<div style="background: lightcoral; width: 60px;" >
2
</div>
<div style="background: lightgreen; width: 20px;">
3
</div>
<div style="background: brown; width: 10px; grid-row: span 3;">
4
</div>
<div style="background:orchid; width: 10px; grid-row: span 2;">
5
</div>
<div style="background: red; width: 40px;">
6
</div>
</div>
</body>
</html>