Intent to prototype: math-depth property and font-size: math

Skip to first unread message

Frédéric Wang

Sep 28, 2020, 7:45:44 AM9/28/20
Summary: Implements the math-depth and font-size: math properties
which indicate how deep some part of a mathematical formula with
respect to the top-level `<math>` and that a scale has to apply to
font-size. This is used by MathML to implement automatic scaling
in scripts etc, as well as for the scriptlevel attribute. Exposing
the magic to CSS provides more flexibility to users and could help
to get rid of less used MathML scriptminsize and scriptsizemultiplier
attributes (I'll send a follow-up email).

scriptlevel has been implemented for a while as an internal CSS
-moz-math-depth property. I've been renaming this property and
changing the syntax but we need some more tweaks to match the




Platform coverage: All

Preference: layout.css.math-depth.enabled

Devtools bug: N/A: no extra work is required for devtools.

Other browsers:

* Safari: No public signal from Apple. Igalia plans to implement it as
part of a MathML interop effort.
Bug is

* Chrome: shipped behind the CSSMathDepth flag ; last patch landed in

More tests for invalid, calc(...) and var(...) will be added too.

Secure contexts: Like all other CSS selectors these are not restricted
to secure contexts.

Is this feature enabled by default in sandboxed iframes?: Yes

Frédéric Wang
Reply all
Reply to author
0 new messages