row-dense-packing-multi-span-005.html (1507B)
1 <!DOCTYPE html> 2 <html> 3 <link rel="help" href="https://drafts.csswg.org/css-grid-3"> 4 <link rel="match" href="row-dense-packing-multi-span-005-ref.html"> 5 <link rel="author" title="Celeste Pan" href="mailto:celestepan@microsoft.com"> 6 <style> 7 .grid-lanes { 8 display: grid-lanes; 9 flow-tolerance: 0; 10 gap: 10px; 11 padding: 10px; 12 grid-lanes-direction: row; 13 grid-template-rows: repeat(4, 60px); 14 grid-auto-flow: dense; 15 } 16 </style> 17 <body> 18 <p>Ensure that dense-packing correctly accounts for the gaps between items when placing them in track openings. Items to be placed in track openings are yellow.</p> 19 <div class="grid-lanes"> 20 <div style="background: aquamarine; width: 120px;" > 21 1 22 </div> 23 <div style="background: blue; width: 40px;" > 24 2 25 </div> 26 <div style="background: blueviolet; width: 20px;"> 27 3 28 </div> 29 <div style="background: lightsteelblue; width: 60px; grid-row: 4;"> 30 4 31 </div> 32 <div style="background: aqua; width: 20px; grid-row: span 4;"> 33 5 34 </div> 35 <div style="background: yellow; width: 10px; grid-row: span 3;"> 36 6 37 </div> 38 <div style="background: yellow; width: 10px; grid-row: span 3;"> 39 7 40 </div> 41 <div style="background: yellow; width: 10px; grid-row: span 3;"> 42 8 43 </div> 44 <div style="background: green; width: 10px; grid-row: span 3;"> 45 9 46 </div> 47 <div style="background: yellow; width: 10px; grid-row: span 2;"> 48 10 49 </div> 50 </div> 51 </body> 52 </html>