tor-browser

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

flexbox-baseline-multi-item-vert-001b.html (1843B)


      1 <!DOCTYPE html>
      2 <!--
      3     Any copyright is dedicated to the Public Domain.
      4     http://creativecommons.org/publicdomain/zero/1.0/
      5 -->
      6 <!-- Testcase for how we compute the baseline of a vertical flex container
      7     with several "order"-reordered flex items, none of which have
      8     "align-self:baseline".  The spec says this about this case:
      9       ...if the flex container has at least one flex item, and its
     10       first flex item has a baseline parallel to the flex
     11       container's main axis, the flex container's main-axis
     12       baseline is that baseline.
     13 -->
     14 <html>
     15 <head>
     16  <title>CSS Test: Testing the baseline of a vertical flex container whose flex items are not baseline-aligned</title>
     17  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
     18  <link rel="help" href="http://www.w3.org/TR/css-flexbox-1/#flex-baselines">
     19  <link rel="match" href="flexbox-baseline-multi-item-vert-001-ref.html">
     20  <meta charset="utf-8">
     21  <link rel="stylesheet" type="text/css" href="/fonts/ahem.css">
     22  <style>
     23    body {
     24      margin: 0;
     25      font: 20px Ahem;
     26      line-height: 20px;
     27      /* Baseline is 0.8em = 16px from top */
     28    }
     29    .flexContainer {
     30      display: inline-flex;
     31      flex-direction: column;
     32      background: lightblue;
     33    }
     34    .smallFont {
     35      font-size: 10px;
     36      line-height: 10px;
     37      /* Baseline is 0.8em = 8px from top */
     38    }
     39    .bigFont {
     40      font-size: 20px;
     41      line-height: 20px;
     42      /* Baseline is 0.8em = 16px from top */
     43    }
     44    .smallOrder { order: -1 }
     45    .bigOrder { order: 30 }
     46  </style>
     47 </head>
     48 <body>
     49  a
     50  <div class="flexContainer">
     51    <div class="bigFont">c</div
     52    ><div class="smallFont smallOrder">b</div>
     53  </div>
     54  <div class="flexContainer">
     55    <div class="smallFont bigOrder">e</div
     56    ><div class="bigFont">d</div>
     57  </div>
     58 </body>
     59 </html>