flexbox-stretch-minimum-002.html (1152B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>Non-negative content-box size of stretched flex item with `stretch` min cross size</title> 4 <link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com"> 5 <link rel="help" href="https://drafts.csswg.org/css-sizing-4/#stretch-fit-sizing"> 6 <link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#stretched"> 7 <link rel="help" href="https://github.com/w3c/csswg-drafts/issues/11076"> 8 <link rel="help" href="https://github.com/servo/servo/issues/38517"> 9 <link rel="match" href="../../reference/ref-filled-green-200px-square.html"> 10 <meta assert="Stretching the cross size of a flex item to the flex line should never result 11 in a negative content-box size."> 12 13 <style> 14 #red { 15 position: absolute; 16 z-index: -1; 17 width: 200px; 18 height: 200px; 19 background: red; 20 } 21 #flex-container { 22 display: flex; 23 flex-direction: column; 24 width: 0; 25 } 26 #flex-item { 27 min-width: stretch; 28 border: 100px solid green; 29 } 30 </style> 31 32 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> 33 <div id="red"></div> 34 <div id="flex-container"> 35 <div id="flex-item"></div> 36 </div>