tor-browser

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

line-height-lh-transition.html (947B)


      1 <!DOCTYPE html>
      2 <title>CSS Values and Units Test: line-height transition affecting lh units</title>
      3 <link rel="help" href="https://www.w3.org/TR/css-values-4/#lh">
      4 <script src="/resources/testharness.js"></script>
      5 <script src="/resources/testharnessreport.js"></script>
      6 <style>
      7  #target {
      8    width: 20lh;
      9    line-height: 10px;
     10    transition: line-height 1s;
     11  }
     12  #target.lh {
     13    line-height: 20px;
     14  }
     15 </style>
     16 <div id="target"></div>
     17 <script>
     18  let t = async_test("lh unit length should change with transitioning line-height");
     19 
     20  t.step(() => {
     21    target.offsetTop;
     22    target.className = "lh";
     23  });
     24 
     25  requestAnimationFrame(() => requestAnimationFrame(() => requestAnimationFrame(() => {
     26    t.step(() => {
     27      assert_not_equals(getComputedStyle(target).width, "200px");
     28      assert_not_equals(getComputedStyle(target).width, "400px");
     29      t.done();
     30    }, "Transition should be progressing. Not at start/end.");
     31  })));
     32 </script>