column-auto-repeat-019.html (1032B)
1 <!DOCTYPE html> 2 <html> 3 <title>Auto-fit repeat tracks with fixed size and auto item placement</title> 4 <link rel="help" href="https://drafts.csswg.org/css-grid-3"> 5 <link rel="author" title="Alison Maher" href="mailto:almaher@microsoft.com"> 6 <script src="/resources/testharness.js"></script> 7 <script src="/resources/testharnessreport.js"></script> 8 <style> 9 .grid-lanes { 10 display: grid-lanes; 11 flow-tolerance: 0; 12 grid-template-columns: repeat(auto-fit, 100px); 13 height: 200px; 14 width: 1000px; 15 } 16 17 .grid-lanes > div { 18 width: 100%; 19 height: 100px; 20 } 21 </style> 22 <div class="grid-lanes"> 23 <div style="grid-column: 1;"></div> 24 <div style="grid-column: 3;"></div> 25 <div></div> 26 <div></div> 27 <div></div> 28 </div> 29 <script> 30 test(function() { 31 const container = document.querySelector('.grid-lanes'); 32 const computedStyle = window.getComputedStyle(container); 33 assert_equals(computedStyle.getPropertyValue('grid-template-columns'), 34 "100px 100px 100px 0px 0px 0px 0px 0px 0px 0px"); 35 }); 36 </script> 37 </html>