<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8"/>
    <title>dir="rtl" VS direction: rtl on math/mrow/mstyle</title>
    <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
    <style>
      math {
          font: 25px/1 Ahem;
      }
    </style>
  </head>
  <body>

    <p>
      <math style="direction: rtl">
        <mtext>X</mtext>
        <mtext>p</mtext>
        <mtext>É</mtext>
      </math>
    </p>

    <p>
      <math>
        <mrow style="direction: rtl">
          <mtext>X</mtext>
          <mtext>p</mtext>
          <mtext>É</mtext>
        </mrow>
      </math>
    </p>

    <p>
      <math>
        <mstyle mathcolor="blue" style="direction: rtl">
          <mtext>X</mtext>
          <mtext>p</mtext>
          <mtext>É</mtext>
        </mstyle>
      </math>
    </p>

  </body>
</html>
