inline-flex.html (1420B)
1 <!DOCTYPE html> 2 <html> 3 <title>CSS Flexbox: Ensure proper formatting with display: inline-flex</title> 4 <link rel="help" href="https://www.w3.org/TR/css-flexbox-1/#flex-containers"> 5 <link rel="help" href="https://www.w3.org/TR/css-flexbox-1/#flex-property"> 6 <meta name="assert" content="This test checks that inline-flex generates a flex container box that is inline-level when placed in flow layout."> 7 <style> 8 #testcase > div { 9 height: 50px; 10 width: 50px; 11 background-color: green; 12 outline: 2px solid darkgreen; 13 } 14 #testcase > div > div { 15 flex: 1; 16 } 17 </style> 18 <script src="/resources/testharness.js"></script> 19 <script src="/resources/testharnessreport.js"></script> 20 <script src="/resources/check-layout-th.js"></script> 21 <body onload="checkLayout('#testcase')"> 22 <div id=log></div> 23 <p>This test passes if the three green boxes are on the same horizontal line.</p> 24 25 <div id="testcase" style="position: relative"> 26 <div data-offset-y="0" data-offset-x="0" data-expected-width="50" data-expected-height="50" style="display: inline-block"> 27 </div><div data-offset-y="0" data-offset-x="50" data-expected-width="50" data-expected-height="50" style="display: inline-flex;"> 28 <div data-expected-width="25"></div> 29 <div data-expected-width="25"></div> 30 </div><div data-offset-y="0" data-offset-x="100" data-expected-width="50" data-expected-height="50" style="display: inline-block"></div> 31 </div> 32 </body> 33 </html>