tor-browser

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

auto-margins-root-element.html (698B)


      1 <!DOCTYPE html>
      2 <link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
      3 <link rel="help" href="https://www.w3.org/TR/CSS22/visudet.html#blockwidth">
      4 <style>
      5  html {
      6      width: 100px;
      7      margin-left: auto;
      8  }
      9  body { /* Just to make testharness display nicely. */
     10      position: absolute;
     11      left: 0;
     12      right: 0;
     13  }
     14 </style>
     15 <script src="/resources/testharness.js"></script>
     16 <script src="/resources/testharnessreport.js"></script>
     17 <script>
     18  test(()=> {
     19      var viewport_width = window.innerWidth;
     20      var html = document.documentElement;
     21      assert_equals(html.offsetLeft, viewport_width - 100);
     22  }, "Root element auto margins resolve");
     23 </script>