column-reverse-dense-packing-001.html (1375B)
1 <!DOCTYPE html> 2 <html> 3 <link rel="help" href="https://drafts.csswg.org/css-grid-3"> 4 <link rel="match" href="column-reverse-dense-packing-001-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 grid-template-columns: repeat(4, 50px) 15px; 11 gap: 10px; 12 grid-lanes-direction: column-reverse; 13 grid-auto-flow: dense; 14 } 15 </style> 16 <body> 17 <p>Test that grid-lanes items with reverse auto placement and explicit placement are correctly positioned within the grid axis during dense-packing.</p> 18 <div class="grid-lanes"> 19 <div style="background: lavender; height: 60px; grid-column: 3;"> 20 1 21 </div> 22 <div style="background: lightgreen; height: 60px; grid-column: 1;"> 23 2 24 </div> 25 <div style="background: lightpink; grid-column: span 4; height: 10px;"> 26 3 27 </div> 28 <!--Item 4 is densely packed into start-most gap of the same layout size as auto-placement without dense-packing.--> 29 <div style="background: yellow; height: 20px;"> 30 4 31 </div> 32 <!--Item 5 is densely-packed into a specified track.--> 33 <div style="background: yellow; height: 10px; grid-column: 4;"> 34 5 35 </div> 36 <!--Item 6 is densely-packed into highest, but not earliest, found gap.--> 37 <div style="background: yellow; height: 10px;"> 38 6 39 </div> 40 </div> 41 </body> 42 </html>