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/masonry/tentative/item-placement/dense-packing/row-dense-packing-multi-span-001.html - WPT Dashboard Interop Dashboard
 
 
<!DOCTYPE html>
<html>
<link rel="match" href="row-dense-packing-multi-span-001-ref.html">
<link rel="author" title="Celeste Pan" href="mailto:celestepan@microsoft.com">
<style>
.masonry {
    display: masonry;
    item-tolerance: 0;
    masonry-direction: row;
    grid-template-rows: repeat(4, 50px);
    grid-auto-flow: dense;
}
</style>
<body>
  <p>Ensure that dense-packing places multi-spanning item into highest eligible track opening. The yellow item is the item that should be placed in track opening.</p>
  <div class="masonry">
    <div style="background: lightskyblue; width: 70px;" >
      1
    </div>
    <div style="background: lightblue; width: 20px; grid-row: 4;" >
      2
    </div>
    <div style="background: darkblue; width: 20px; grid-row: 3 / span 2;">
      3
    </div>
    <div style="background: lightsteelblue; width: 20px; grid-row: span 4;" >
      4
    </div>
    <div style="background: yellow; width: 10px; grid-row: span 2;" >
      5
    </div>
  </div>
</body>
</html>