Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Commit 873805a

Browse files
committed
Bug 1642632 [wpt PR 23912] - Add MathML tests for presentational hints, a=testonly
Automatic update from web-platform-tests Add MathML tests for presentational hints (#23912) * Add MathML tests for presentational hints presentational hints are author-level zero-specifity style attribute is author-level + infinite specificity So style wins over mapped attributes. https://www.w3.org/TR/css-cascade-3/#cascading https://html.spec.whatwg.org/multipage/rendering.html#presentational-hints -- wpt-commits: 57bee5d4f85fb3fbc04aa0d5ddb2aca7c8803f05 wpt-pr: 23912 Differential Revision: https://phabricator.services.mozilla.com/D78784
1 parent 0eb1b1e commit 873805a

File tree

2 files changed

+135
-0
lines changed

2 files changed

+135
-0
lines changed
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8"/>
5+
<title>presentational hints</title>
6+
<link rel="stylesheet" href="/fonts/ahem.css">
7+
<style>
8+
@font-face {
9+
font-family: DoubleStruck;
10+
src: url("/fonts/math/mathvariant-double-struck.woff");
11+
}
12+
@font-face {
13+
font-family: Italic;
14+
src: url("/fonts/math/mathvariant-italic.woff");
15+
}
16+
math {
17+
font: 25px/1 Ahem;
18+
}
19+
</style>
20+
<body>
21+
<p>dir:
22+
<math style="direction: ltr;">
23+
<mtext>X</mtext>
24+
<mtext>p</mtext>
25+
</math>
26+
</p>
27+
<p>mathcolor:
28+
<math style="color: green;">
29+
<mtext>X</mtext>
30+
<mtext>p</mtext>
31+
</math>
32+
</p>
33+
<p>mathbackground:
34+
<math style="background: green;">
35+
<mtext>X</mtext>
36+
<mtext>p</mtext>
37+
</p>
38+
<p>mathsize:
39+
<math>
40+
<mtext style="font-size: 100%">X</mtext>
41+
</math>
42+
</p>
43+
<p>mathvariant:
44+
<math style="font-family: DoubleStruck, Italic;">
45+
<mtext style="text-transform: math-italic">&#x628;</mtext>
46+
</math>
47+
</p>
48+
<p>displaystyle:
49+
<math style="math-style: inline">
50+
<munder>
51+
<mo movablelimits="true">X</mo>
52+
<mo>X</mo>
53+
</munder>
54+
</math>
55+
</p>
56+
<p>scriptlevel:
57+
<math>
58+
<mtext style="font-size: scriptlevel(0);">X</mtext>
59+
</math>
60+
</p>
61+
</body>
62+
</html>
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8"/>
5+
<title>presentational hints</title>
6+
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#attributes-common-to-html-and-mathml-elements">
7+
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#css-styling">
8+
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#double-struck-mappings">
9+
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#legacy-mathml-style-attributes">
10+
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#new-text-transform-values">
11+
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#the-displaystyle-and-scriptlevel-attributes">
12+
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#the-mathvariant-attribute">
13+
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#the-mathvariant-attribute">
14+
<link rel="match" href="presentational-hints-001-ref.html"/>
15+
<link rel="stylesheet" href="/fonts/ahem.css">
16+
<meta name="assert" content="Verify that local author style wins over presentation hints attributes">
17+
<style>
18+
@font-face {
19+
font-family: DoubleStruck;
20+
src: url("/fonts/math/mathvariant-double-struck.woff");
21+
}
22+
@font-face {
23+
font-family: Italic;
24+
src: url("/fonts/math/mathvariant-italic.woff");
25+
}
26+
math {
27+
font: 25px/1 Ahem;
28+
}
29+
</style>
30+
<body>
31+
<p>dir:
32+
<math dir="rtl" style="direction: ltr;">
33+
<mtext>X</mtext>
34+
<mtext>p</mtext>
35+
</math>
36+
</p>
37+
<p>mathcolor:
38+
<math mathcolor="red" style="color: green;">
39+
<mtext>X</mtext>
40+
<mtext>p</mtext>
41+
</math>
42+
</p>
43+
<p>mathbackground:
44+
<math mathbackground="red" style="background: green;">
45+
<mtext>X</mtext>
46+
<mtext>p</mtext>
47+
</p>
48+
<p>mathsize:
49+
<math>
50+
<mtext mathsize="300%" style="font-size: 100%">X</mtext>
51+
</math>
52+
</p>
53+
<p>mathvariant:
54+
<math style="font-family: DoubleStruck, Italic;">
55+
<mtext mathvariant="double-struck"
56+
style="text-transform: math-italic">&#x628;</mtext>
57+
</math>
58+
</p>
59+
<p>displaystyle:
60+
<math displaystyle="true" style="math-style: inline">
61+
<munder>
62+
<mo movablelimits="true">X</mo>
63+
<mo>X</mo>
64+
</munder>
65+
</math>
66+
</p>
67+
<p>scriptlevel:
68+
<math>
69+
<mtext scriptlevel="1" style="font-size: scriptlevel(0);">X</mtext>
70+
</math>
71+
</p>
72+
</body>
73+
</html>

0 commit comments

Comments
 (0)