185 lines
6.5 KiB
HTML
185 lines
6.5 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8"/>
|
|
<title>MathML lengths</title>
|
|
<link rel="help" href="https://w3c.github.io/mathml-core/#css-styling">
|
|
<link rel="help" href="https://w3c.github.io/mathml-core/#types-for-mathml-attribute-values">
|
|
<link rel="help" href="https://w3c.github.io/mathml-core/#legacy-mathml-style-attributes">
|
|
<link rel="help" href="https://w3c.github.io/mathml-core/#space-mspace">
|
|
<link rel="help" href="https://www.w3.org/TR/css-values-4/#relative-lengths">
|
|
<link rel="match" href="lengths-1-ref.html"/>
|
|
<meta name="assert" content="Verify whether the different units are accepted for MathML lengths.">
|
|
<style>
|
|
@font-face {
|
|
font-family: TestFont;
|
|
src: url("/fonts/math/css-units.woff");
|
|
}
|
|
span, math {
|
|
font-family: TestFont;
|
|
font-size: 10px; /* 1em = 10px, 1ex is about 5px */
|
|
}
|
|
span {
|
|
position: absolute;
|
|
display: inline-block;
|
|
height: 10px;
|
|
}
|
|
#red > span {
|
|
background: red;
|
|
}
|
|
#green > span {
|
|
background: green;
|
|
}
|
|
/* For lh and rlh. */
|
|
html {
|
|
line-height: 17px;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<p>Test passes if there is a green square and no red.</p>
|
|
|
|
<!-- Omitted units: vw, vh, vi, vb, vmin, vmax -->
|
|
<div>
|
|
<div id="red" style="position: absolute; width: 340px; height: 340px; background: green;">
|
|
<!-- px -->
|
|
<span style="top: 0px"><math><mspace width="200px"/></math></span>
|
|
<span style="top: 10px; width: 200px"></span>
|
|
|
|
<!-- cm -->
|
|
<span style="top: 20px"><math><mspace width="5.08cm"/></math></span>
|
|
<span style="top: 30px; width: 192px"></span>
|
|
|
|
<!-- em -->
|
|
<span style="top: 40px"><math><mspace width="20em"/></math></span>
|
|
<span style="top: 50px; width: 200px"></span>
|
|
|
|
<!-- ex -->
|
|
<span style="top: 60px"><math><mspace width="30ex"/></math></span>
|
|
<span style="top: 70px; width: 30ex"></span>
|
|
|
|
<!-- in -->
|
|
<span style="top: 80px"><math><mspace width="2in"/></math></span>
|
|
<span style="top: 90px; width: 192px"></span>
|
|
|
|
<!-- mm -->
|
|
<span style="top: 100px"><math><mspace width="50.8mm"/></math></span>
|
|
<span style="top: 110px; width: 192px"></span>
|
|
|
|
<!-- pc -->
|
|
<span style="top: 120px"><math><mspace width="12.5pc"/></math></span>
|
|
<span style="top: 130px; width: 200px"></span>
|
|
|
|
<!-- pt -->
|
|
<span style="top: 140px"><math><mspace width="150pt"/></math></span>
|
|
<span style="top: 150px; width: 200px"></span>
|
|
|
|
<!-- % -->
|
|
<span style="top: 160px"><math><mstyle mathsize="2000%"><mspace width="1em"/></mstyle></math></span>
|
|
<span style="top: 170px; width: 200px"></span>
|
|
|
|
<!-- q -->
|
|
<span style="top: 180px"><math><mspace width="203.2q"/></math></span>
|
|
<span style="top: 190px; width: 192px"></span>
|
|
|
|
<!-- ch -->
|
|
<span style="top: 200px"><math><mspace width="20ch"/></math></span>
|
|
<span style="top: 210px; width: 20ch"></span>
|
|
|
|
<!-- cap -->
|
|
<span style="top: 220px"><math><mspace width="30cap"/></math></span>
|
|
<span style="top: 230px; width: 30cap"></span>
|
|
|
|
<!-- ic -->
|
|
<span style="top: 240px"><math><mspace width="20ic"/></math></span>
|
|
<span style="top: 250px; width: 200px"></span>
|
|
|
|
<!-- rem -->
|
|
<span style="top: 260px"><math><mspace width="10rem"/></math></span>
|
|
<span style="top: 270px; width: 160px"></span>
|
|
|
|
<!-- lh -->
|
|
<span style="top: 280px"><math><mspace width="13lh" style="line-height: 15px;"/></math></span>
|
|
<span style="top: 290px; width: 195px"></span>
|
|
|
|
<!-- rlh -->
|
|
<span style="top: 300px"><math><mspace width="11rlh"/></math></span>
|
|
<span style="top: 310px; width: 187px"></span>
|
|
|
|
<!-- unitless nonzero values should be ignored -->
|
|
<span style="top: 320px"><math><mstyle mathsize="20.0"><mspace width="1em"/></mstyle></math></span>
|
|
<span style="top: 330px; width: 10px"></span>
|
|
</div>
|
|
|
|
<div id="green" style="position: absolute; width: 340px; height: 340px;">
|
|
<!-- px -->
|
|
<span style="top: 10px"><math><mspace width="200px"/></math></span>
|
|
<span style="top: 0px; width: 200px"></span>
|
|
|
|
<!-- cm -->
|
|
<span style="top: 30px"><math><mspace width="5.08cm"/></math></span>
|
|
<span style="top: 20px; width: 192px"></span>
|
|
|
|
<!-- em -->
|
|
<span title="em" style="top: 50px"><math><mspace width="20em"/></math></span>
|
|
<span title="em" style="top: 40px; width: 200px"></span>
|
|
|
|
<!-- ex -->
|
|
<span title="ex" style="top: 70px"><math><mspace width="30ex"/></math></span>
|
|
<span title="ex" style="top: 60px; width: 30ex"></span>
|
|
|
|
<!-- in -->
|
|
<span style="top: 90px"><math><mspace width="2in"/></math></span>
|
|
<span style="top: 80px; width: 192px"></span>
|
|
|
|
<!-- mm -->
|
|
<span style="top: 110px"><math><mspace width="50.8mm"/></math></span>
|
|
<span style="top: 100px; width: 192px"></span>
|
|
|
|
<!-- pc -->
|
|
<span style="top: 130px"><math><mspace width="12.5pc"/></math></span>
|
|
<span style="top: 120px; width: 200px"></span>
|
|
|
|
<!-- pt -->
|
|
<span style="top: 150px"><math><mspace width="150pt"/></math></span>
|
|
<span style="top: 140px; width: 200px"></span>
|
|
|
|
<!-- % -->
|
|
<span style="top: 170px"><math><mstyle mathsize="2000%"><mspace width="1em"/></mstyle></math></span>
|
|
<span style="top: 160px; width: 200px"></span>
|
|
|
|
<!-- q -->
|
|
<span style="top: 190px"><math><mspace width="203.2q"/></math></span>
|
|
<span style="top: 180px; width: 192px"></span>
|
|
|
|
<!-- ch -->
|
|
<span style="top: 210px"><math><mspace width="20ch"/></math></span>
|
|
<span style="top: 200px; width: 20ch"></span>
|
|
|
|
<!-- cap -->
|
|
<span style="top: 230px"><math><mspace width="30cap"/></math></span>
|
|
<span style="top: 220px; width: 30cap"></span>
|
|
|
|
<!-- ic -->
|
|
<span style="top: 250px"><math><mspace width="20ic"/></math></span>
|
|
<span style="top: 240px; width: 200px"></span>
|
|
|
|
<!-- rem -->
|
|
<span style="top: 270px"><math><mspace width="10rem"/></math></span>
|
|
<span style="top: 260px; width: 160px"></span>
|
|
|
|
<!-- lh -->
|
|
<span style="top: 290px"><math><mspace width="13lh" style="line-height: 15px;"/></math></span>
|
|
<span style="top: 280px; width: 195px"></span>
|
|
|
|
<!-- rlh -->
|
|
<span style="top: 310px"><math><mspace width="11rlh"/></math></span>
|
|
<span style="top: 300px; width: 187px"></span>
|
|
|
|
<!-- unitless nonzero values should be ignored -->
|
|
<span style="top: 330px"><math><mstyle mathsize="20.0"><mspace width="1em"/></mstyle></math></span>
|
|
<span style="top: 320px; width: 10px"></span>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|