Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

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

67 views
Skip to first unread message

Frédéric Wang

unread,
Sep 28, 2020, 7:45:44 AM9/28/20
to
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
spec.

Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1667090

Standard:

*
https://mathml-refresh.github.io/mathml-core/#the-math-script-level-property
* https://github.com/w3c/csswg-drafts/issues/5389

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 https://bugs.webkit.org/show_bug.cgi?id=202303

* Chrome: shipped behind the CSSMathDepth flag ; last patch landed in
https://chromium-review.googlesource.com/c/chromium/src/+/2423843

web-platform-tests:
https://w3c-test.org/css/css-fonts/math-script-level-and-math-style
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
0 new messages