math-shift

Experimental: これは実験的な機能です。
本番で使用する前にブラウザー互換性一覧表をチェックしてください。

math-shift プロパティは MathML 数式の中の上付き文字を通常のシフトとコンパクトシフトのどちらで上げるべきかを示します。

構文

css
/* キーワード値 */
math-shift: normal;
math-shift: compact;

/* グローバル値 */
math-shift: inherit;
math-shift: initial;
math-shift: revert;
math-shift: revert-layer;
math-shift: unset;

normal

初期値で、通常のレンダリングを示します。 MathML 数式の上付き文字は OpenType MATH テーブルの superscriptShiftUp 引数を用います。

compact

コンパクトなレンダリングを示します。 MathML 数式の中の上付き文字は OpenType MATH テーブルの superscriptShiftUpCramped 引数を使い、一般的に小さくなります。

公式定義

初期値normal
適用対象すべての要素
継承あり
計算値指定通り
アニメーションの種類アニメーション不可

形式文法

math-shift = 
normal |
compact

CSS

css
math {
  math-shift: compact;
}

MathML

次の MathML は OpenType MATH テーブルを持つフォントを使って "x の 2 乗" の 2 つのバージョンを表示しています。 math-shift プロパティを実装しているブラウザーは、上付き文字を少し異なるシフトを使って上げることになります。

html
<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>

仕様書

Specification
MathML Core
# the-math-shift

ブラウザーの互換性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
math-shift
Experimental

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support
Experimental. Expect behavior to change in the future.

関連情報