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).
| Description | Before (native) | After (polyfill) |
|---|---|---|
Spec example: maxsize="50%" limits both parentheses.Copied onto each mo.
|
|
|
linethickness. Nested mstyle wins; an explicit
mfrac value wins over both.After: medium, then thick, then 1px.
|
|
|
width applies to mspace only, not mpadded.The empty mspace becomes 2em. The mpadded (around the 'z') stays unpadded.
|
|
|
lspace applies to mo only, not mpadded.
|
|
|
align="right" applies to munder, not mtable.
|
|
|
align="left" applies to mover, not mtable.
|
|
|
align="right" applies to munderover, not mtable.
|
|
|
rowalign="bottom center top" and columnalign="right left center" apply to mtable, not mtr or mtd.
|
|
|
Attributes consumed by other polyfills:
notation, bevelled, subscriptshift.
|
|
|
scriptsizemultiplier="0.4" and scriptminsize="18pt".At 64px, the first superscript is ~26pt; the next one stays at least 18pt. |
|
|
mathsize="200%" on mstyle.Left on mstyle.
Not copied onto the enclosed mi, mn, mo, or mtext.
Should both be the same.
|
|
|
display="inline" on math, displaystyle="true" on mstyle.Left on mstyle. Not copied onto the enclosed elements. The before/after should be the same.
|
|
|