tor-browser

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

position-fixed-at-bottom-right-on-viewport.html (919B)


      1 <!doctype html>
      2 <meta charset=utf-8>
      3 <meta name="viewport" content="width=device-width">
      4 <link rel="help" href="https://drafts.csswg.org/css-position/#fixed-pos">
      5 <meta name="assert" content="This test checks that `bottom` and `right` returned by getComputedStyle for position:fixed elements attached to right bottom of the layout viewport expaned to the minimum-scale size">
      6 <title></title>
      7 <script src=/resources/testharness.js></script>
      8 <script src=/resources/testharnessreport.js></script>
      9 <style>
     10 html, body {
     11  margin: 0;
     12  width: 100%;
     13  height: 100%;
     14 }
     15 #target {
     16  position: fixed;
     17  bottom: 0;
     18  right: 0;
     19  background: green;
     20  width: 100px;
     21  height: 100px;
     22 }
     23 </style>
     24 <div style="width: 200%; height: 200%;"></div>
     25 <div id="target"></div>
     26 <script>
     27 test(() => {
     28  assert_equals(getComputedStyle(target).bottom, "0px");
     29  assert_equals(getComputedStyle(target).right, "0px");
     30 }, "position:fixed ");
     31 </script>