tor-browser

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

menclose-2-roundedbox-ref.html (1277B)


      1 <!DOCTYPE html>
      2 <html class="reftest-wait">
      3  <head>
      4    <meta charset="utf-8"/>
      5    <title>menclose roundedbox</title>
      6    <link rel="stylesheet" href="/fonts/ahem.css" />
      7    <style>
      8      math, #box {
      9          font: 25px/1 Ahem;
     10      }
     11    </style>
     12 
     13    <script type="text/javascript">
     14      function doTest()
     15      {
     16          var box = document.getElementById("roundedbox").getBoundingClientRect();
     17          r = document.getElementById("box");
     18          r.style.left = `calc(${box.left}px - .25em)`;
     19          r.style.top = `calc(${box.top}px - .25em)`
     20          r.style.width = `calc(${box.width}px + .5em)`;
     21          r.style.height = `calc(${box.height}px + .5em)`;
     22          document.documentElement.removeAttribute("class");
     23      }
     24      document.documentElement.addEventListener("TestRendered",doTest);
     25    </script>
     26  </head>
     27  <body>
     28    <div style="position: absolute; left: 20px; top: 20px;">
     29      <math>
     30        <mphantom>
     31          <menclose id="roundedbox" notation="roundedbox">
     32            <mspace width="200px" height="100px"></mspace>
     33          </menclose>
     34        </mphantom>
     35      </math>
     36    </div>
     37 
     38    <div id="box" style="position: absolute; box-sizing: border-box; border:.5em solid green; border-radius: .5em;"></div>
     39 </div>
     40 
     41 </body>
     42 </html>