tor-browser

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

flex-basis-item-margins-001.html (1098B)


      1 <!DOCTYPE html>
      2 <title>Flexbox: margins and available space</title>
      3 <link rel="author" title="David Grogan" href="mailto:dgrogan@chromium.org">
      4 <link rel="help" href="https://drafts.csswg.org/css-flexbox/#algo-main-item" title="Case E">
      5 <link rel="match" href="../reference/ref-filled-green-100px-square.xht">
      6 <meta name="assert" content="An item's inline margins are subtracted from available space when laying out to determine flex-basis in a column container." />
      7 
      8 <style>
      9 .inline-block {
     10  display: inline-block;
     11  width: 40px;
     12  height: 50px;
     13 }
     14 
     15 #reference-overlapped-red {
     16  position: absolute;
     17  background-color: red;
     18  width: 100px;
     19  height: 100px;
     20  z-index: -1;
     21 }
     22 </style>
     23 
     24 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
     25 
     26 <div id="reference-overlapped-red"></div>
     27 
     28 <div style="display: flex; flex-direction: column; width: 100px; background: green;">
     29  <!-- 21px makes the inline-blocks wrap -->
     30  <div style="margin-right: 21px; flex: 0 0 auto; line-height: 0px;">
     31    <div class="inline-block"></div><div class="inline-block"></div>
     32  </div>
     33 </div>