row-auto-repeat-008.html (2081B)
1 <!DOCTYPE html> 2 <title>Auto repeat tracks and percentage min sizes</title> 3 <link rel="help" href="https://drafts.csswg.org/css-grid-3"> 4 <meta name="assert" content="This test checks that auto repeat tracks use percentage min size when available to compute the number of tracks."> 5 <link rel="author" title="Alison Maher" href="mailto:almaher@microsoft.com"> 6 <style> 7 .grid-lanes { 8 position: relative; 9 display: grid-lanes; 10 grid-lanes-direction: row; 11 grid-template-rows: repeat(auto-fill, 50px); 12 min-width: 50%; 13 min-height: 80%; 14 float: left; 15 background: pink; 16 } 17 .wrapper { 18 width: 600px; 19 height: 250px; 20 } 21 .item { 22 background: lime; 23 /* Place item on the last row. */ 24 grid-row: -2; 25 width: 300px; 26 height: 100%; 27 } 28 </style> 29 <script src="/resources/testharness.js"></script> 30 <script src="/resources/testharnessreport.js"></script> 31 <script src="/resources/check-layout-th.js"></script> 32 <body onload="checkLayout('.grid-lanes');"> 33 34 <div id="log"></div> 35 36 <div class="wrapper"> 37 <div class="grid-lanes" data-expected-width="300" data-expected-height="200"> 38 <div class="item" data-offset-x="0" data-offset-y="150" data-expected-width="300" data-expected-height="50"></div> 39 </div> 40 </div> 41 42 <div class="wrapper"> 43 <div class="grid-lanes" style="width: 200px; height: 100px;" data-expected-width="300" data-expected-height="200"> 44 <div class="item" data-offset-x="0" data-offset-y="150" data-expected-width="300" data-expected-height="50"></div> 45 </div> 46 </div> 47 48 <div class="wrapper"> 49 <div class="grid-lanes" style="width: min-content; height: min-content;" data-expected-width="300" data-expected-height="200"> 50 <div class="item" data-offset-x="0" data-offset-y="150" data-expected-width="300" data-expected-height="50"></div> 51 </div> 52 </div> 53 54 <div class="wrapper"> 55 <div class="grid-lanes" style="width: max-content; height: max-content;" data-expected-width="300" data-expected-height="200"> 56 <div class="item" data-offset-x="0" data-offset-y="150" data-expected-width="300" data-expected-height="50"></div> 57 </div> 58 </div> 59 60 </body>