column-dense-packing-multi-span-012.html (1746B)
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-multi-span-012-ref.html"> 5 <link rel="author" title="Celeste Pan" href="mailto:celestepan@microsoft.com"> 6 <style> 7 .grid-lanes { 8 display: grid-lanes; 9 item-tolerance: 0; 10 grid-template-columns: repeat(3, 50px); 11 grid-auto-flow: dense; 12 } 13 </style> 14 <body> 15 <p>When dense-packing, ensure that open tracks are split correctly.</p> 16 <div class="grid-lanes"> 17 <div style="background: lightskyblue; height: 30px; grid-column: 1;" > 18 1 19 </div> 20 <div style="background: blue; height: 15px; grid-column: 1 / span 2;"> 21 2 22 </div> 23 <div style="background: lightskyblue; height: 30px; grid-column: 1;" > 24 3 25 </div> 26 <div style="background: blue; height: 15px; grid-column: 1 / span 2;"> 27 4 28 </div> 29 <div style="background: yellow; height: 15px; grid-column: span 2;"> 30 5 31 </div> 32 <div style="background: yellow; height: 15px; grid-column: span 2;"> 33 6 34 </div> 35 <div style="background: lightskyblue; height: 90px; grid-column: 3;" > 36 7 37 </div> 38 <div style="background: blue; height: 10px; grid-column: 2 / span 2;"> 39 8 40 </div> 41 <!-- Item that visually takes up 1 track, but span 2 tracks. --> 42 <div style="background: yellow; height: 15px; width: 50px; grid-column: span 2;"> 43 9 44 </div> 45 <!-- Item that visually takes up 2 tracks, but only spans 1 track. --> 46 <div style="background: yellow; height: 30px; width: 100px;"> 47 10 48 </div> 49 <div style="background: yellow; height: 10px;"> 50 11 51 </div> 52 <div style="background: yellow; height: 15px;"> 53 12 54 </div> 55 </div> 56 </body> 57 </html>