inferred-mrow-stretchy.html (4202B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>Stretchy in inferred mrows</title> 6 <link rel="help" href="https://w3c.github.io/mathml-core/#horizontally-group-sub-expressions-mrow"> 7 <link rel="help" href="https://w3c.github.io/mathml-core/#radicals-msqrt-mroot"> 8 <link rel="help" href="https://w3c.github.io/mathml-core/#style-change-mstyle"> 9 <link rel="help" href="https://w3c.github.io/mathml-core/#error-message-merror"> 10 <link rel="help" href="https://w3c.github.io/mathml-core/#making-sub-expressions-invisible-mphantom"> 11 <link rel="help" href="https://w3c.github.io/mathml-core/#the-top-level-math-element"> 12 <link rel="help" href="https://www.w3.org/TR/MathML3/chapter3.html#presm.menclose"> 13 <link rel="help" href="https://w3c.github.io/mathml-core/#adjust-space-around-content-mpadded"> 14 <link rel="help" href="https://w3c.github.io/mathml-core/#operator-fence-separator-or-accent-mo"> 15 <meta name="assert" content="Operators can stretch inside mrow-like elements."> 16 <script src="/mathml/support/feature-detection.js"></script> 17 <script src="/mathml/support/fonts.js"></script> 18 <script src="/resources/testharness.js"></script> 19 <script src="/resources/testharnessreport.js"></script> 20 <style> 21 mo { 22 font-size: 10px; 23 font-family: axisheight5000-verticalarrow14000; 24 } 25 @font-face { 26 font-family: axisheight5000-verticalarrow14000; 27 src: url("/fonts/math/axisheight5000-verticalarrow14000.woff"); 28 } 29 </style> 30 <script type="text/javascript"> 31 setup({ explicit_done: true }); 32 window.addEventListener("load", () => { loadAllFonts().then(runTests); }); 33 function runTests() 34 { 35 ["Mrow", "Sqrt", "Style", "Error", "Phantom", "Math", "Menclose", "Mpadded", "Unknown", "Mtd", "None", "Mprescripts", "Mfenced", "A"].forEach((tag) => { 36 var mo = document.getElementById(`mo${tag}`); 37 test(function() { 38 assert_true(MathMLFeatureDetection.has_mspace()); 39 assert_greater_than_equal(mo.getBoundingClientRect().height, 100); 40 }, `operator stretching inside ${tag}`); 41 }); 42 done(); 43 } 44 </script> 45 </head> 46 <body> 47 <div id="log"></div> 48 <p> 49 <math><mrow><mo id="moMrow">↨</mo><mspace width="1px" height="100px" style="background: blue"></mspace></mrow></math> 50 <math><msqrt><mo id="moSqrt">↨</mo><mspace width="1px" height="100px" style="background: magenta"></mspace></msqrt></math> 51 <math><mstyle><mo id="moStyle">↨</mo><mspace width="1px" height="100px" style="background: magenta"></mspace></mstyle></math> 52 <math><merror><mo id="moError">↨</mo><mspace width="1px" height="100px" style="background: magenta"></mspace></merror></math> 53 <math><mphantom><mo style="visibilty: visible;" id="moPhantom">↨</mo><mspace width="1px" height="100px" style="background: magenta"></mspace></mphantom></math> 54 <math><mo id="moMath">↨</mo><mspace width="1px" height="100px" style="background: magenta"></mspace></math> 55 <!-- menclose is treated as <unknown> in MathML Core --> 56 <math><menclose notation="box"><mo id="moMenclose">↨</mo><mspace width="1px" height="100px" style="background: magenta"></mspace></menclose></math> 57 <math><mpadded lspace="10px"><mo id="moMpadded">↨</mo><mspace width="1px" height="100px" style="background: magenta"></mspace></mpadded></math> 58 <math><unknown><mo id="moUnknown">↨</mo><mspace width="1px" height="100px" style="background: magenta"></mspace></unknown></math> 59 <math><mtable><mtr><mtd><mo id="moMtd">↨</mo><mspace width="1px" height="100px" style="background: magenta"></mspace></mtd></mtr></mtable></math> 60 <math><none><mo id="moNone">↨</mo><mspace width="1px" height="100px" style="background: magenta"></mspace></none></math> 61 <math><mprescripts><mo id="moMprescripts">↨</mo><mspace width="1px" height="100px" style="background: magenta"></mspace></mprescripts></math> 62 <math><mfenced><mo id="moMfenced">↨</mo><mspace width="1px" height="100px" style="background: magenta"></mspace></mfenced></math> 63 <math><a><mo id="moA">↨</mo><mspace width="1px" height="100px" style="background: magenta"></mspace></a></math> 64 </p> 65 </body> 66 </html>