row-dense-packing-003.html (1078B)
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-003-ref.html"> 5 <link rel="author" title="Celeste Pan" href="mailto:celestepan@microsoft.com"> 6 <style> 7 .grid-lanes { 8 display: grid-lanes; 9 background: gray; 10 flow-tolerance: 0; 11 grid-lanes-direction: row; 12 grid-template-rows: repeat(3, 50px); 13 grid-auto-flow: dense; 14 } 15 </style> 16 <body> 17 <p>Ensure that dense-packing does not affect the layout when all items are single-spanning.</p> 18 <div class="grid-lanes"> 19 <div style="background: lightskyblue; width: 20px;" > 20 1 21 </div> 22 <div style="background: lightcoral; width: 60px;" > 23 2 24 </div> 25 <div style="background: lightgreen; width: 60px;"> 26 3 27 </div> 28 <div style="background: brown; width: 10px;"> 29 4 30 </div> 31 <div style="background: red; width: 40px;"> 32 5 33 </div> 34 <div style="background: pink; width: 40px;"> 35 6 36 </div> 37 <div style="background: yellow; width: 40px;"> 38 7 39 </div> 40 </div> 41 </body> 42 </html>