tor-browser

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

col-wrap-005.html (1244B)


      1 <!DOCTYPE html>
      2 <link rel="author" title="David Grogan" href="mailto:dgrogan@chromium.org">
      3 <link rel="help" href="https://drafts.csswg.org/css-flexbox/#intrinsic-sizes">
      4 <script src="/resources/testharness.js"></script>
      5 <script src="/resources/testharnessreport.js"></script>
      6 <script src="/resources/check-layout-th.js"></script>
      7 <meta name="assert"
      8  content="The item still has sufficient available size at the time fit-content is resolved. (A bug in the code could cause the right-most item to have a width of 75px.)">
      9 
     10 <style>
     11  .item {
     12    /* Remove min-height so we don't have to think about it. */
     13    min-height: 0px;
     14    flex: 0 0 100px;
     15    outline: 1px solid;
     16  }
     17 
     18  .grandchild {
     19    width: 75px;
     20    float: left;
     21  }
     22 </style>
     23 
     24 <div
     25  style="display: flex; flex-flow: column wrap; width: max-content; height: 100px; background: green; position: relative;"
     26  data-expected-width="250">
     27  <div class="item" style="width: 100px;"></div>
     28  <div class="item" style="width: fit-content;" data-expected-width="150"
     29    data-offset-x="100">
     30    <!-- This item has min-content=75 and max-content=150. -->
     31    <div class="grandchild"></div>
     32    <div class="grandchild"></div>
     33  </div>
     34 </div>
     35 
     36 <script>
     37  checkLayout('body > div');
     38 </script>