tor-browser

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

table-as-item-percent-width-cell-001.html (1450B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>Flexbox Test: display:table flex items with percent-width cells and content keywords for used flex-basis</title>
      4 <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
      5 <link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#valdef-flex-basis-content">
      6 <link rel="match" href="table-as-item-percent-width-cell-001-ref.html">
      7 <meta name="assert" content="If a table as a flex item has used 'flex-basis:content' (or another content-based keyword), and default flex factors, and plenty of space, then it should be sized similarly to a table with 'width:max-content' in a block formatting context.">
      8 <style>
      9  .container {
     10    display: flex;
     11    width: 200px;
     12    border: 1px solid black;
     13  }
     14  td {
     15    background-color: cyan;
     16    width: 100%;
     17    border: 1px solid gray;
     18  }
     19 
     20 </style>
     21 <body>
     22  <div class="container">
     23    <!-- The used value of flex-basis is 'content' here, due to the flex-basis
     24         and the main-size property both having the value 'auto'. -->
     25    <table><tr><td>1</td><td>2</td></tr></table>
     26  </div>
     27  <div class="container">
     28    <table style="flex-basis: content"><tr><td>1</td><td>2</td></tr></table>
     29  </div>
     30  <div class="container">
     31    <table style="flex-basis: min-content"><tr><td>1</td><td>2</td></tr></table>
     32  </div>
     33  <div class="container">
     34    <table style="flex-basis: max-content"><tr><td>1</td><td>2</td></tr></table>
     35  </div>
     36 </body>