W3cubDocs

/CSS

math-depth

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The math-depth property describes a notion of depth for each element of a mathematical formula, with respect to the top-level container of that formula. Concretely, this is used to determine the computed value of the font-size property when its specified value is math.

Syntax

/* Keyword values */
math-depth: auto-add;

/* Relative values */
math-depth: add(2);
math-depth: add(-2);

/* Absolute value */
math-depth: 4;

/* Global values */
math-depth: inherit;
math-depth: initial;
math-depth: revert;
math-depth: revert-layer;
math-depth: unset;

Values

auto-add

Set to the inherited math-depth plus 1 when inherited math-style is compact.

add(<integer>)

Set to the inherited math-depth plus the specified integer.

<integer>

Set to the specified integer.

Formal definition

Initial value 0
Applies to all elements
Inherited yes
Computed value as specified
Animation type Not animatable

Formal syntax

math-depth = 
auto-add |
add( <integer> ) |
<integer>

Examples

CSS

math {
  math-depth: auto-add;
}

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-depth 10987 10987
83Implementation lacks support for font-size: math to be complete.
No 9573
NoSee bug 202303.
109 10987 No 74
NoSee bug 202303.
No

See also

© 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/CSS/math-depth