property

Math style — CSS reference

Selects normal versus compact mathematical layout. Among other differences, compact math may use smaller scripts and different large-operator sizing. This example compares fractions in normal and compact style.

Formal Syntax & Structure

css syntaxcss
math-style: normal;

Working Example

Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>math-style</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-style:normal}#other{math-style:compact}</style><body><math id="m"><mfrac><mi id="n">x</mi><mi>y</mi></mfrac></math> <math id="other"><mfrac><mi id="o">x</mi><mi>y</mi></mfrac></math></body></html>
CSS Reference