flex-basis-007.html (1028B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS Flexbox Test: flex-basis - auto</title> 4 <link rel="author" title="Intel" href="http://www.intel.com"> 5 <link rel="author" title="Intel" href="mailto:shiyoux.tan@intel.com"> 6 <link rel="help" title="7.3.3. The 'flex-basis' property" href="http://www.w3.org/TR/css-flexbox-1/#flex-basis-property"> 7 <link rel="match" href="../reference/ref-filled-green-100px-square.xht"> 8 <meta name="assert" content="The 'flex-basis' property set 'auto', the actual width of tested element same as the value which specified by width property."> 9 <style> 10 #container { 11 background-color: red; 12 display: flex; 13 height: 100px; 14 width: 100px; 15 } 16 #container div{ 17 background-color: green; 18 height: 100px; 19 } 20 #ref { 21 width: 50px; 22 } 23 #test { 24 flex-basis: auto; 25 width: 50px; 26 } 27 </style> 28 <body> 29 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> 30 <div id="container"> 31 <div id="test"></div> 32 <div id="ref"></div> 33 </div> 34 </body>