Re: [csswg-drafts] [css-fonts] Add new CSS properties math-script-level and math-style (#3746)

@briansmith The proposal is based on MathML 3's model (corresponding to displaystyle and scriptlevel attributes), Microsoft's OpenType MATH table and current Mozilla's CSS-based implementation. It has been discussed in length during one MathML Core meeting, trying to remove things that don't align with CSS and we reached this consensus (thanks to @emilio for helping on simplification!).

The browsers' CSS engine code don't know about the DOM so they really need the values of math-script-level and math-style as CSS properties in order to calculate the computed value of the font-size. Additionally, math-style is used in several other places of the layout classes and from Firefox/WebKit's experience, CSS resolution is more reliable than implementing our own inheritance model in MathML classes.

As indicated in the explainer / MathML3, MathML's model (and hence this proposal) is a generalization of TeX: "These properties can be used to emulate TeX’s \displaystyle, \textstyle, \scriptstyle, and \scriptscriptstyle modes, they correspond to math-style and math-script-level as “display” and 0, “inline” and 0, “inline” and 1, and inline and 2, respectively. These are important use cases requested by math people.". So you can already get what you want by setting math-style and math-script-level appropriately.

GitHub Notification of comment by fred-wang
Please view or discuss this issue at using your GitHub account

Received on Tuesday, 30 April 2019 09:48:00 UTC