Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /mathml/presentation-markup/direction/direction-overall.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Verify dir attribute on various containers</title>
<link rel="help" href="https://w3c.github.io/mathml-core/#attributes-common-to-html-and-mathml-elements">
<meta name="assert" content="Verify dir attribute on various containers.">
<link rel="match" href="direction-overall-ref.html">
</head>
<body>
<!-- Test dir="rtl" on <math>, <mrow> and <mstyle> elements. The rectangle
inside these elements should be displayed right-to-left. -->
<p>
math:
<math dir="rtl">
<mspace width="25px" height="25px" mathbackground="red"/>
<mspace width="25px" height="25px" mathbackground="green"/>
<mspace width="25px" height="25px" mathbackground="blue"/>
</math>
</p>
<p>
mrow:
<math>
<mrow dir="rtl">
<mspace width="25px" height="25px" mathbackground="red"/>
<mspace width="25px" height="25px" mathbackground="green"/>
<mspace width="25px" height="25px" mathbackground="blue"/>
</mrow>
</math>
</p>
<p>
mstyle:
<math>
<mstyle dir="rtl">
<mspace width="25px" height="25px" mathbackground="red"/>
<mspace width="25px" height="25px" mathbackground="green"/>
<mspace width="25px" height="25px" mathbackground="blue"/>
</mstyle>
</math>
</p>
<script src="/mathml/support/feature-detection.js"></script>
<script>MathMLFeatureDetection.ensure_for_match_reftest("has_mspace");</script>
</body>
</html>