grid-auto-repeat-min-size-003.html (1435B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS Grid Layout Test: Auto repeat tracks and percentage min sizes with percentage track sizes</title> 4 <link rel="author" title="Jacques Newman" href="mailto:janewman@microsoft.com"> 5 <link rel="help" href="https://drafts.csswg.org/css-grid-1/#auto-repeat"> 6 <meta name="assert" 7 content="This test checks that auto repeat tracks can use percentage track 8 size when only a min size is available to compute the number of tracks."> 9 <link rel="stylesheet" href="/css/support/grid.css"> 10 <style> 11 .grid { 12 position: relative; 13 display: inline-grid; 14 grid-template-columns: repeat(auto-fill, 25%); 15 grid-auto-rows: 100px; 16 min-width: 50%; 17 float: left; 18 } 19 20 .wrapper { 21 width: 600px; 22 } 23 24 #cell { 25 background: lime; 26 } 27 </style> 28 <script src="/resources/testharness.js"></script> 29 <script src="/resources/testharnessreport.js"></script> 30 <script src="/resources/check-layout-th.js"></script> 31 32 <body onload="checkLayout('.grid');"> 33 34 <div id="log"></div> 35 36 <div class="wrapper"> 37 <div class="grid" data-expected-width="300" data-expected-height="200"> 38 <div id="cell" data-expected-width="75">Cell 1</div> 39 <div id="cell" data-expected-width="75">Cell 2</div> 40 <div id="cell" data-expected-width="75">Cell 3</div> 41 <div id="cell" data-expected-width="75">Cell 4</div> 42 <div id="cell" data-expected-width="75">Cell 5</div> 43 </div> 44 </div>