svg-root-as-flex-item-001.html (1072B)
1 <!DOCTYPE html> 2 <title>SVG root as flex item</title> 3 <link rel="author" title="David Grogan" href="mailto:dgrogan@chromium.org"> 4 <link rel="help" href="https://drafts.csswg.org/css-flexbox/#algo-main-item" title="Part E"> 5 <!-- The note refers to CSS2ยง10, but I didn't include that here because items in flex formatting contexts aren't included. --> 6 <link rel="help" href="https://www.w3.org/TR/css-sizing-3/#intrinsic-sizes" title="first Note"> 7 <link rel="match" href="../reference/ref-filled-green-100px-square.xht"> 8 <link rel="bookmark" href="https://crbug.com/1065134"> 9 <meta name="assert" content="Honor SVG root's aspect ratio for flex layout." /> 10 11 <style> 12 #reference-overlapped-red { 13 position: absolute; 14 background-color: red; 15 width: 100px; 16 height: 100px; 17 z-index: -1; 18 } 19 </style> 20 21 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> 22 23 <div id="reference-overlapped-red"></div> 24 25 <div style="display: flex;"> 26 <svg viewBox="0 0 200 200" style="height: 100px"> 27 <rect width="200" height="200" fill="green" /> 28 </svg> 29 </div>