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