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/column-auto-repeat-026.html - WPT Dashboard Interop Dashboard
 
 
<!DOCTYPE html>
<html>
<title>Auto-fit repeat tracks with fixed size and auto/explicit spanning item placement</title>
<link rel="author" title="Alison Maher" href="mailto:almaher@microsoft.com">
<link rel="match" href="column-auto-repeat-026-ref.html">
<style>
.masonry {
    display: masonry;
    item-tolerance: 0;
    grid-template-columns: repeat(4, 50px) repeat(auto-fit, 50px) repeat(4, 50px);
    height: 200px;
    width: 500px;
    gap: 10px;
}
.masonry > div {
    width: 100%;
    height: 100px;
    background-color: orange;
}
</style>
<div class="masonry">
  <div style="grid-column: span 3;"></div>
  <div style="grid-column: -1;"></div>
</div>
</html>