column-dense-packing-004.html (991B)
1 <!DOCTYPE html> 2 <html> 3 <link rel="help" href="https://drafts.csswg.org/css-grid-3"> 4 <link rel="match" href="column-dense-packing-004-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-template-columns: 30px 40px 50px 30px; 12 padding: 10px; 13 grid-auto-flow: dense; 14 } 15 </style> 16 <body> 17 <p>Ensure dense-packing only places items into gaps where the track size is the same as where the item would have been laid out WITHOUT dense packing.</p> 18 <div class="grid-lanes"> 19 <div style="background: lightskyblue; height: 40px; grid-column: 1" > 20 1 21 </div> 22 <div style="background: lightgreen; height: 40px; grid-column: 3"> 23 2 24 </div> 25 <div style="background: brown; height: 10px; grid-column: span 4;"> 26 3 27 </div> 28 <div style="background: red; height: 40px; width: 30px;"> 29 4 30 </div> 31 </div> 32 </body> 33 </html>