flex-line-004.html (1494B)
1 <!DOCTYPE html> 2 <link rel="help" href="https://github.com/w3c/csswg-drafts/issues/11784"> 3 <script src='/resources/testharness.js'></script> 4 <script src='/resources/testharnessreport.js'></script> 5 <script src="/resources/check-layout-th.js"></script> 6 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> 7 <meta name="assert" 8 content="width:stretch item stretches to container width during the measure pass; container has min-content width"> 9 <style> 10 .container { 11 display: flex; 12 flex-direction: column; 13 max-width: 100px; 14 width: min-content; 15 height: 100px; 16 border: solid; 17 flex-wrap: wrap; 18 /* Prevent the lines from stretching. */ 19 align-content: start; 20 font: 20px/1 Ahem; 21 } 22 23 .container>div { 24 border: 3px solid; 25 } 26 27 .stretch { 28 width: -moz-available; 29 width: -webkit-fill-available; 30 width: stretch; 31 } 32 </style> 33 34 <div class="container"> 35 <div class="stretch" style="height: 75px; border-color: cyan" 36 data-expected-width="26">a</div> 37 <div class="stretch" style="height: 75px; border-color: magenta" 38 data-expected-width="26">b</div> 39 </div> 40 <div class="container"> 41 <div class="stretch" style="height: 75px; border-color: cyan" 42 data-expected-width="156">c</div> 43 <div style="border-color: orange; width: 150px"></div> 44 <div class="stretch" style="height: 75px; border-color: magenta" 45 data-expected-width="100">d</div> 46 </div> 47 48 <script> 49 document.fonts.ready.then(() => checkLayout(".stretch")); 50 </script>