column-dense-packing-multi-span-011-ref.html (944B)
1 <!DOCTYPE html> 2 <html> 3 <style> 4 .grid { 5 display: grid; 6 grid-template-columns: repeat(3, 50px); 7 grid-auto-flow: dense; 8 } 9 </style> 10 <body> 11 <p>Ensure that open tracks are used when dense-packing a multi-span item.</p> 12 <div class="grid"> 13 <div style="background: lightskyblue; height: 60px;" > 14 1 15 </div> 16 <div style="background: darkblue; height: 20px; grid-column: 1 / span 2;"> 17 2 18 </div> 19 <div style="background: yellow; height: 20px; grid-column: span 2;"> 20 3 21 </div> 22 <div style="background: skyblue; height: 10px; grid-column: span 3; grid-row: 3;"> 23 4 24 </div> 25 <div style="background: lightskyblue; height: 70px; grid-column: 3; grid-row: 4;" > 26 5 27 </div> 28 <div style="background: darkblue; height: 50px; grid-column: 2 / span 2;"> 29 6 30 </div> 31 <div style="background: yellow; height: 50px; grid-column: span 2;"> 32 7 33 </div> 34 </div> 35 </body> 36 </html>