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/track-sizing/auto-repeat/row-auto-repeat-001.html - WPT Dashboard Interop Dashboard
 
 
<!DOCTYPE html>
<html>
<title>Auto repeat tracks with fixed size</title>
<link rel="match" href="row-auto-repeat-001-ref.html">
<link rel="author" title="Alison Maher" href="mailto:almaher@microsoft.com">
<style>
.masonry {
    display: masonry;
    background: gray;
    item-tolerance: 0;
    masonry-direction: row;
    grid-template-rows: repeat(auto-fill, 100px);
    width: 300px;
    height: 300px;
}
.masonry > div {
    width: 100px;
    height: 100%;
}
</style>
<body>
  <div class="masonry">
    <div style="background: lightskyblue;">
      Number 1
    </div>
    <div style="background: lightcoral;">
      Number 2
    </div>
    <div style="background: lightgreen;">
      Number 3
    </div>
    <div style="background: lightpink;">
      Number 4
    </div>
    <div style="background: orange;">
      Number 5
    </div>
    <div style="grid-row: span 2; background: brown;">
      Number 6
    </div>
  </div>
</body>
</html>