tor-browser

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

flexbox-min-height-auto-004.html (2410B)


      1 <!DOCTYPE html>
      2 <!--
      3     Any copyright is dedicated to the Public Domain.
      4     http://creativecommons.org/publicdomain/zero/1.0/
      5 -->
      6 <html>
      7  <head>
      8    <meta charset="utf-8">
      9    <title>CSS Test: Testing min-height:auto & 'overflow' interaction</title>
     10    <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
     11    <link rel="help" href="http://www.w3.org/TR/css-flexbox-1/#min-size-auto">
     12    <link rel="match" href="flexbox-min-height-auto-004-ref.html">
     13 <!--
     14     This testcase checks how "overflow-x" indirectly impacts the sizing
     15     behavior of flex items with "min-height:auto" (the new initial value
     16     for "min-height"), via its influence on "overflow-y".
     17 
     18     In particular, the flex-item-specific "min-height:auto" behavior is
     19     supposed to be disabled (e.g. we end up with min-height:0) when
     20     "overflow-y" is non-"visible".  Moreover, when "overflow-x" is set to a
     21     scrolling value, it forces "overflow-y" to compute to a scrolling value
     22     as well, as described at
     23       http://www.w3.org/TR/css-overflow-3/#overflow-properties
     24     So, "overflow-x" has an indirect effect (via "overflow-y") here.
     25 -->
     26    <style>
     27      .flexbox {
     28        display: flex;
     29        flex-direction: column;
     30        height: 30px;  /* Shrink flex items below min-height */
     31        margin-right: 2px; /* (Just for spacing things out, visually) */
     32        float: left;
     33      }
     34 
     35      .flexbox > * {
     36        /* Flex items have purple border: */
     37        border: 2px dotted purple;
     38      }
     39 
     40      .flexbox > * > * {
     41        /* Flex items' contents are gray & fixed-size: */
     42        background: gray;
     43        width: 40px;
     44        height: 80px;
     45      }
     46 
     47      .xvisible { overflow-x: visible; }
     48      .xhidden  { overflow-x: hidden;  }
     49      .xscroll  { overflow-x: scroll;  }
     50      .xauto    { overflow-x: auto;    }
     51    </style>
     52  </head>
     53  <body>
     54    <!-- min-height:auto should prevent shrinking below intrinsic height when
     55         the flex item has "overflow-x: visible", but not for any other
     56         overflow-x values (because of overflow-x's influence on overflow-y).
     57    -->
     58    <div class="flexbox"><div class="xvisible"><div></div></div></div>
     59    <div class="flexbox"><div class="xhidden"><div></div></div></div>
     60    <div class="flexbox"><div class="xscroll"><div></div></div></div>
     61    <div class="flexbox"><div class="xauto"><div></div></div></div>
     62  </body>
     63 </html>