tor-browser

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

resize-multicol-with-fixed-size-children-003.html (1065B)


      1 <!DOCTYPE html>
      2 <title>Resize multicol with fixed-width child</title>
      3 <link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
      4 <link rel="help" href="https://www.w3.org/TR/css-multicol-1/#columns">
      5 <div id="multicol" style="position:relative; columns:2; column-fill:auto; gap:20px; width:220px; height:100px;">
      6  <div style="width:50px;">
      7    <div>
      8      <div>
      9        <div style="height:150px;"></div>
     10        <div id="target"></div>
     11      </div>
     12    </div>
     13  </div>
     14 </div>
     15 <script src="/resources/testharness.js"></script>
     16 <script src="/resources/testharnessreport.js"></script>
     17 <script>
     18  test(() => {
     19    document.body.offsetTop;
     20 
     21    // Increasing multicol width won't affect the layout of anything inside (the
     22    // child has a fixed width), except for the columns themselves, which will
     23    // become wider.
     24    multicol.style.width = "320px";
     25 
     26    // Check something in the second column.
     27    assert_equals(target.offsetLeft, 170);
     28    assert_equals(target.offsetTop, 50);
     29  }, "Resize multicol with fixed-width child");
     30 </script>