row-auto-placement-max-content.html (1101B)
1 <!DOCTYPE html> 2 <html> 3 <link rel="help" href="https://drafts.csswg.org/css-grid-3"> 4 <link rel="match" href="row-auto-placement-max-content-ref.html"> 5 <link rel="author" title="Celeste Pan" href="mailto:celestepan@microsoft.com"> 6 <style> 7 html,body { 8 color:black; background-color:white; font:15px/1 monospace; padding:0; margin:0; 9 } 10 11 .grid-lanes { 12 display: grid-lanes; 13 background: gray; 14 position: relative; 15 flow-tolerance: 0; 16 grid-lanes-direction: row; 17 grid-template-rows: auto auto auto; 18 width: max-content; 19 padding: 10px; 20 } 21 </style> 22 <body> 23 <p>Ensure that grid-lanes containers are sized correctly under max-content constraints even if the items do not have the max-content style.</p> 24 <div class="grid-lanes"> 25 <div style="background: lightskyblue;"> 26 Number 1 27 </div> 28 <div class="second-track" style="background: lightcoral;"> 29 Number 2 30 </div> 31 <div class="third-track" style="background: lightgreen;"> 32 Number 3 33 </div> 34 <div style="grid-row: span 2; background: brown;"> 35 Number 4 36 </div> 37 </div> 38 </body> 39 </html>