column-reverse-dense-packing-multi-span-002-ref.html (686B)
1 <!DOCTYPE html> 2 <html> 3 <style> 4 .grid { 5 display: grid; 6 grid-auto-flow: dense; 7 grid-template-columns: 10px 10px 20px 15px 5px; 8 } 9 </style> 10 <body> 11 <p>Ensure that dense-packing with multi-span items are placed into tracks with the same used size and the same number of tracks.</p> 12 <div class="grid"> 13 <div style="background: yellow; height: 20px; width: 20px; grid-column: 4" > 14 4 15 </div> 16 <div style="background: lightskyblue; height: 20px; grid-column: 3" > 17 1 18 </div> 19 <div style="background: lightblue; height: 20px; grid-column: span 5" > 20 2 21 </div> 22 <div style="background: darkblue; height: 20px; grid-column: 3 / span 3;"> 23 3 24 </div> 25 </div> 26 </body> 27 </html>