column-reverse-dense-packing-multi-span-004-ref.html (1068B)
1 <!DOCTYPE html> 2 <html> 3 <style> 4 .grid { 5 display: grid; 6 grid-auto-flow: dense; 7 grid-template-columns: repeat(4, 50px); width: 170px; 8 } 9 </style> 10 <body> 11 <p>Ensure that dense-packing correctly iterates through all possible track openings to find an opening span. Item that should be placed into opening is yellow.</p> 12 <div class="grid""> 13 <div style="background: aquamarine; height: 60px; grid-column: 4;" > 14 1 15 </div> 16 <div style="background: blue; height: 40px; grid-column: 3;" > 17 2 18 </div> 19 <div style="background: blueviolet; height: 20px; grid-column: 2;"> 20 3 21 </div> 22 <div style="background: lightsteelblue; height: 60px; grid-column: 1;"> 23 6 24 </div> 25 <div style="background: lightblue; height: 10px; grid-column: 3 / span 2;"> 26 4 27 </div> 28 <div style="background: lightskyblue; grid-column: 1; height: 30px; grid-column: 4;"> 29 5 30 </div> 31 <div style="background: aqua; height: 20px; grid-column: span 4;"> 32 7 33 </div> 34 <div style="background: yellow; height: 10px; grid-column: span 3;"> 35 8 36 </div> 37 </div> 38 </body> 39 </html>