tor-browser

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

pt-to-px-width.html (627B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>10pt converted to offset/client/scroll width</title>
      4 <link rel="help" href="https://www.w3.org/TR/css-values-4/#absolute-lengths">
      5 
      6 <script src="/resources/testharness.js"></script>
      7 <script src="/resources/testharnessreport.js"></script>
      8 <style>
      9 /* According to the CSS Values specification 10pt is abour 13.33px. */
     10 #target { width: 10pt; }
     11 </style>
     12 
     13 <div id="target"></div>
     14 
     15 <script>
     16 test(() => {
     17  assert_equals(target.scrollWidth, 13, "scrollWidth");
     18  assert_equals(target.offsetWidth, 13, "offsetWidth");
     19  assert_equals(target.clientWidth, 13, "clientWidth");
     20 });
     21 </script>