remove-wrapped-001.html (1192B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1902156"> 4 <link rel="help" href="https://drafts.csswg.org/css-flexbox/#flex-items"> 5 <link rel="match" href="/css/reference/ref-filled-green-100px-square.xht"> 6 <link rel="author" href="mailto:dholbert@mozilla.com" title="Daniel Holbert"> 7 <link rel="author" href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez"> 8 <link rel="author" href="https://mozilla.org" title="Mozilla"> 9 <style> 10 #flex { 11 display: flex; 12 width: 100px; 13 justify-content: center; 14 background: red; 15 /* This gap ensures that we'll see some of the red background, 16 if there ends up being more than 1 flex item. */ 17 gap: 90px; 18 } 19 #swatch { 20 width: 100px; 21 height: 100px; 22 background: green; 23 } 24 </style> 25 <script> 26 function go() { 27 flex.getBoundingClientRect(); 28 flex.removeChild(flex.lastChild); 29 } 30 </script> 31 <body onload="go()"> 32 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> 33 <!-- The fact that we have (and take) a linewrap opportunity 34 in "foo bar" is important be able to trigger the bug: --> 35 <div id="flex"><div id="swatch"></div>foo bar</div> 36 </body>