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