tor-browser

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

flexbox-table-flex-items-3.html (2050B)


      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>
     10    CSS Test: Testing that implicit "flex-basis: content" on table wrapper box
     11    doesn't prevent explicit table size from influencing flex base size.
     12  </title>
     13  <!-- XXXdholbert NOTE: This probably eventually should move to our
     14       upstreamed reftest directory.  But for now, this is just asserting
     15       backwards-compatible/interoperable (but not necessary spec-compliant)
     16       behavior, per https://github.com/w3c/csswg-drafts/issues/2604 -->
     17  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
     18  <link rel="help" href="https://www.w3.org/TR/css-flexbox-1/#flex-base-size">
     19  <link rel="match" href="flexbox-table-flex-items-3.html">
     20  <style>
     21  .container {
     22    display: flex;
     23    flex-direction: column;
     24    height: 100px;
     25    float: left;
     26    border: 1px solid black;
     27  }
     28 
     29  /* Two types of flex items: */
     30  .table {
     31    display: table;
     32    border: 2px solid teal;
     33  }
     34  .block {
     35    border: 2px solid brown;
     36  }
     37 
     38  /* Each flex item gets one of these as its contents,
     39     to have a nonzero content size: */
     40  ib {
     41    display: inline-block;
     42    background: blue;
     43    border: 1px solid gray;
     44    width: 15px;
     45    height: 10px;
     46  }
     47  </style>
     48 </head>
     49 <body>
     50 <!-- auto size: -->
     51 <div class="container">
     52  <div class="table"><ib></ib></div>
     53  <div class="block"><ib></ib></div>
     54 </div>
     55 
     56 <!-- px size: -->
     57 <div class="container">
     58  <div class="table" style="height: 30px"><ib></ib></div>
     59  <div class="block" style="height: 30px"><ib></ib></div>
     60 </div>
     61 
     62 <!-- % size: -->
     63 <div class="container">
     64  <div class="table" style="height: 30%"><ib></ib></div>
     65  <div class="block" style="height: 30%"><ib></ib></div>
     66 </div>
     67 
     68 <!-- calc() size: -->
     69 <div class="container">
     70  <div class="table" style="height: calc(10px + 20%)"><ib></ib></div>
     71  <div class="block" style="height: calc(10px + 20%)"><ib></ib></div>
     72 </div>
     73 
     74 </body>
     75 </html>