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/column-dense-packing-003.html - WPT Dashboard Interop Dashboard
 
 
<!DOCTYPE html>
<html>
<link rel="match" href="column-dense-packing-003-ref.html">
<link rel="author" title="Celeste Pan" href="mailto:celestepan@microsoft.com">
<style>
.masonry {
    display: masonry;
    background: gray;
    item-tolerance: 0;
    grid-template-columns: repeat(3, 50px);
    width: 170px;
    grid-auto-flow: dense;
}
</style>
<body>
  <p>Ensure that dense-packing has no impact when all items are single-spanning.</p>
  <div class="masonry">
    <div style="background: lightskyblue; height: 20px;" >
      1
    </div>
    <div style="background: lightcoral; height: 60px;" >
      2
    </div>
    <div style="background: lightgreen; height: 60px;">
      3
    </div>
    <div style="background: brown; height: 15px;">
      4
    </div>
    <div style="background: red; height: 40px;">
      5
    </div>
    <div style="background: pink; height: 40px;">
      6
    </div>
    <div style="background: yellow; height: 40px;">
      7
    </div>
  </div>
</body>
</html>