column-dense-packing-006-ref.html (1112B)
1 <!DOCTYPE html> 2 <html> 3 <style> 4 .grid { 5 display: grid; 6 grid-template-columns: repeat(4, 50px); 7 } 8 .upwards { 9 transform: translateY(-20px); 10 } 11 </style> 12 <body> 13 <p>Ensure that dense-packing in grid-lanes only places items with a specified track into track openings in that same specified track.</p> 14 <div class="grid"> 15 <div style="background: brown; height: 20px;"></div> 16 <div style="background: brown; height: 40px; grid-column: 2;"></div> 17 <div style="background: pink; height: 20px; grid-column-start: 3;"></div> 18 <div style="background: brown; height: 60px; grid-column-start: 4;"></div> 19 <div class="upwards" style="background: brown; height: 20px; grid-column: span 2;"></div> 20 <div class="upwards" style="background: brown; height: 20px; grid-column: span 4;"></div> 21 <div class="upwards" style="background: brown; height: 20px; grid-column: span 3;"></div> 22 <div class="upwards" style="background: yellow; height: 20px; grid-column-start: 4;"></div> 23 <div class="upwards" style="background: brown; height: 20px; grid-column: span 4;"></div> 24 </div> 25 </body> 26 </html>