mathvariant → Unicode math alphanumerics
Serve the repo root over HTTP (for example python -m http.server 8080) and open
http://localhost:8080/mathvariant/index.html so ES modules load.
The Before column is outside the transform scope; the After column runs
mathvariant/mathvariant.js via _MathTransforms.transform.
Supported elements match the selector *[mathvariant]; each row uses mi or mn as noted.
The polyfill replaces text with styled code points and removes mathvariant when every character mapped.
| Markup | Before | After |
|---|---|---|
<mi mathvariant="normal">πx</mi> (no-op) |
||
<mi mathvariant="bold">ABαβ012</mi> |
||
<mi mathvariant="italic">ABCabch</mi> (maps h to U+210E) |
||
<mi mathvariant="bold-italic">ABΓγ</mi> |
||
<mi mathvariant="double-struck">CHNRZ</mi> + <mn mathvariant="double-struck">012</mn> |
||
<mi mathvariant="bold-fraktur">Abcz</mi> |
||
<mi mathvariant="script">BEFeg</mi> |
||
<mi mathvariant="bold-script">Abcz</mi> |
||
<mi mathvariant="fraktur">CHIRZabc</mi> |
||
<mi mathvariant="sans-serif">Abz012</mi> |
||
<mi mathvariant="bold-sans-serif">AbzΓγ789</mi> |
||
<mi mathvariant="sans-serif-italic">Abcz</mi> |
||
<mi mathvariant="sans-serif-bold-italic">ΑΒΓαβγ</mi> |
||
<mi mathvariant="monospace">Abcz012</mi> |
||
<mi mathvariant="isolated">بتثج</mi> (Arabic math) |
||
<mi mathvariant="initial">بتثج</mi> |
||
<mi mathvariant="tailed">جحخس</mi> |
||
<mi mathvariant="looped">بتثج</mi> |
||
<mi mathvariant="stretched">بتثج</mi> |
||
<mi mathvariant="chancery">ABCHWxyz</mi> (script) |
||
<mi mathvariant="roundhand">ABCHWxyz</mi> (script + VS) |