summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/mathml/presentation-markup/fractions/frac-parameters-gap-005-ref.html
blob: c794a50047c21418a446b7f16068c23759048732 (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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<!DOCTYPE html>
<html class="reftest-wait">
<head>
<meta charset="utf-8">
<title>Fraction parameters</title>
<style>
  math, mspace {
    font-size: 20px;
  }
  @font-face {
    font-family: displaystylegapmin4000;
    src: url("/fonts/math/stack-displaystylegapmin4000.woff");
  }
  #reference {
    background: green;
  }
  #frame {
    position: absolute;
    border-top: 4px solid black;
    border-bottom: 4px solid black;
    width: 100%;
  }
</style>
<script src="/mathml/support/fonts.js"></script>
<script>
  function runTests() {
    var div = document.getElementById("frame");
    var refBox = document.getElementById("reference").getBoundingClientRect();
    div.style.top = `${refBox.top-2}px`;
    div.style.height = `${refBox.height-4}px`;
    document.documentElement.classList.remove('reftest-wait');
  }
  window.addEventListener("load", () => { loadAllFonts().then(runTests); });
</script>
</head>
<body>
  <p>
    This test passes if the blue squares are aligned:
  </p>
  <p>
    <math display="block" style="font-family: displaystylegapmin4000">
      <mspace height="10em" depth="10em"/>
      <mfrac linethickness="0px">
        <mspace width="3em" depth="1em"/>
        <mspace id="reference" width="3em" height=".5em" depth=".5em"/>
      </mfrac>
      <mfrac linethickness="0px">
        <mspace width="3em" depth="1em"/>
        <mspace width="1em" height=".5em" depth=".5em" style="background: blue"/>
      </mfrac>
      <mfrac linethickness="0px">
        <mspace width="3em" depth="1.5em"/>
        <mspace width="1em" height="1em" style="background: blue"/>
      </mfrac>
      <mfrac linethickness="0px">
        <mspace width="3em" depth=".5em"/>
        <mspace width="1em" depth="1em" style="background: blue"/>
      </mfrac>
    </math>
  </p>
  <div id="frame"></div>
</body>
</html>