property

Math shift — CSS reference

Selects the cramped or ordinary superscript shift metric in mathematical layout. The actual offset depends on font metrics and other constraints; compact does not guarantee a distinct pixel position in every formula.

Formal Syntax & Structure

css syntaxcss
math-shift: compact;

Working Example

Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>math-shift</title><style>body{margin:8px;font:32px/1.5 monospace;color:#172033;background:white}rt{font:16px/1.2 monospace}math{font-size:40px}#m{math-shift:compact}</style><body><math id="m"><msup><mi id="b">x</mi><mn id="t">2</mn></msup></math></body></html>
CSS Reference