flex-minimum-height-flex-items-016.html (937B)
1 <!DOCTYPE html> 2 <title>CSS Flexbox: min-height: auto with flex items containing percentage-sized children</title> 3 <link rel="author" title="Google LLC" href="https://www.google.com/" /> 4 <link rel="help" href="https://drafts.csswg.org/css-flexbox/#min-size-auto" /> 5 <link rel="issue" href="https://bugs.chromium.org/p/chromium/issues/detail?id=981481" /> 6 <link rel="issue" href="https://bugs.chromium.org/p/chromium/issues/detail?id=984606" /> 7 <link rel="match" href="../reference/ref-filled-green-100px-square.xht" /> 8 9 <style> 10 .flexbox { 11 display: flex; 12 width: 100px; 13 flex-direction: column; 14 } 15 .item { 16 flex-basis: 0; 17 background: green; 18 } 19 .percentage { 20 height: 100%; 21 } 22 .fixed { 23 height: 100px; 24 } 25 26 </style> 27 28 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> 29 30 <div class="flexbox"> 31 <div class="item"> 32 <div class="percentage"></div> 33 <div class="fixed"></div> 34 </div> 35 </div>