tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

flex-minimum-height-flex-items-019.html (1342B)


      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="match" href="../reference/ref-filled-green-100px-square.xht" />
      6 <link rel="issue" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1003556" />
      7 
      8 <style>
      9 .flex {
     10    display: flex;
     11 }
     12 .column {
     13    flex-direction: column;
     14 }
     15 
     16 .bigger-than-parent {
     17    height: 100%;
     18    min-height: 100px;
     19    background-color: red;
     20 }
     21 
     22 #reference-overlapped-green {
     23    position: absolute;
     24    background-color: green;
     25    width: 100px;
     26    height: 100px;
     27    z-index: 1;
     28 }
     29 
     30 </style>
     31 
     32 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
     33 
     34 <div id="reference-overlapped-green"></div>
     35 
     36 <div id="outer" style="width: 100px; height: 300px;" class="flex">
     37  <div style="height: 100px; width: 100px; background: blue;" class="flex column">
     38      <div style="flex: 0 1 100%"></div>
     39 
     40      <div style="flex: 1 0 30px;">
     41          <div class="bigger-than-parent">
     42          </div>
     43      </div>
     44  </div>
     45 </div>
     46 
     47 <script>
     48 onload = function() {
     49  var outer = document.getElementById("outer");
     50  outer.offsetWidth;
     51  outer.style.height = "200px";
     52 };
     53 </script>