property

Math depth — CSS reference

Tracks mathematical nesting depth. An integer fixes the depth, add(n) changes inherited depth, and auto-add increments when inherited math-style is compact. With font-size: math the depth influences script sizing.

Formal Syntax & Structure

css syntaxcss
math-depth: add(1);

Working Example

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