The math-shift
property indicates whether superscripts inside MathML formulas should be raised by a normal or compact shift.
Syntax
math-shift: normal;
math-shift: compact;
math-shift: inherit;
math-shift: initial;
math-shift: revert;
math-shift: revert-layer;
math-shift: unset;
Values
-
normal
-
The initial value, indicates normal rendering. Superscripts in MathML formulas use the superscriptShiftUp parameter from the OpenType MATH table.
-
compact
-
Indicates compact rendering. Superscripts in MathML formulas use the superscriptShiftUpCramped parameter from the OpenType MATH table, which is generally smaller.
math-shift =
normal |
compact
CSS
math {
math-shift: compact;
}
MathML
The following MathML displays two versions of "x squared" using a font with an OpenType MATH table. Browser implementing the math-shift
property should raise the superscripts using slightly different shifts.
<math style="font-size: 64pt;">
<msup style="math-shift: normal">
<mi>x</mi>
<mn>2</mn>
</msup>
<msup style="math-shift: compact">
<mi>x</mi>
<mn>2</mn>
</msup>
</math>
Specifications
Browser compatibility
|
Desktop |
Mobile |
|
Chrome |
Edge |
Firefox |
Internet Explorer |
Opera |
Safari |
WebView Android |
Chrome Android |
Firefox for Android |
Opera Android |
Safari on IOS |
Samsung Internet |
math-shift |
109 |
109 |
No |
No |
95 |
No |
109 |
109 |
No |
74 |
No |
21.0 |