mstyle attribute defaults

Serve the repo root over HTTP (e.g. python -m http.server 8080) and open http://localhost:8080/mstyle/index.html so ES modules load.

MathML 3 lets mstyle change the default of presentation attributes for its descendants. MathML Core treats mstyle as an mrow and only inherits displaystyle, scriptlevel, mathcolor, mathbackground, mathsize, and dir. mstyle/mstyle.js copies the other attributes onto the elements that accept them (closest mstyle wins; an explicit value on the element wins). The Before column is outside the transform (red outline); the After column is inside .mstyle-after (blue outline).

Before vs after _MathTransforms.transform
Description Before (native) After (polyfill)
Spec example: maxsize="50%" limits both parentheses.
Copied onto each mo.
( ab )
( ab )
linethickness. Nested mstyle wins; an explicit mfrac value wins over both.
After: medium, then thick, then 1px.
12 34 56
12 34 56
width applies to mspace only, not mpadded.
The empty mspace becomes 2em. The mpadded (around the 'z') stays unpadded.
x y z
x y z
lspace applies to mo only, not mpadded.
a + b c
a + b c
align="right" applies to munder, not mtable.
x+y n abb
x+y n abb
align="left" applies to mover, not mtable.
x+y n abb
x+y n abb
align="right" applies to munderover, not mtable.
x+y n m abb
x+y n m abb
rowalign="bottom center top" and columnalign="right left center" apply to mtable, not mtr or mtd.
a+b+c x y1z2 a1b2 u+v+w z d e1f2 p+q+r
a+b+c x y1z2 a1b2 u+v+w z d e1f2 p+q+r
Attributes consumed by other polyfills: notation, bevelled, subscriptshift.
x ab x1
x ab x1
scriptsizemultiplier="0.4" and scriptminsize="18pt".
At 64px, the first superscript is ~26pt; the next one stays at least 18pt.
x y z
x y z
mathsize="200%" on mstyle.
Left on mstyle. Not copied onto the enclosed mi, mn, mo, or mtext. Should both be the same.
x 2 + text
x 2 + text
display="inline" on math, displaystyle="true" on mstyle.
Left on mstyle. Not copied onto the enclosed elements. The before/after should be the same.
∑ i=1 n ab
∑ i=1 n ab