mo-single-char-and-children.html (2364B)
1 <!DOCTYPE html> 2 <html class="reftest-wait"> 3 <head> 4 <meta charset="utf-8"> 5 <title><mo> with a single character and children</title> 6 <link rel="help" href="https://w3c.github.io/mathml-core/#algorithm-for-determining-the-properties-of-an-embellished-operator"> 7 <meta name="assert" content="Verify that the default operator properties are used for an mo element whose text is a single character but which contains children."> 8 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css"/> 9 <link rel="match" href="mo-single-char-and-children-ref.html"> 10 <style> 11 math { font: 25px/1 Ahem; } 12 </style> 13 </head> 14 <body> 15 <p>There should be 5/18em horizontal gaps around the middle rectangles:</p> 16 <p><math><mn>p</mn><mo><span>(</span></mo><mn>p</mn></math></p> 17 <p><math><mn>p</mn><mo>(<span></span></mo><mn>p</mn></math></p> 18 <p><math><mn>p</mn><mo><span></span>(</mo><mn>p</mn></math></p> 19 <p><math><mn>p</mn><mo id="dynamic-add">(</mo><mn>p</mn></math></p> 20 <p><math><mn>p</mn><mo id="dynamic-text-add">=</mo><mn>p</mn></math></p> 21 22 <p>There should be no horizontal gap around the middle rectangles:</p> 23 24 <p><math><mn>p</mn><mo stretchy="false">(</mo><mn>p</mn></math></p> 25 <p><math><mn>p</mn><mo id="dynamic-remove" stretchy="false"><span></span>(</mo><mn>p</mn></math></p> 26 <p><math><mn>p</mn><mo stretchy="false"><!-- COMMENT -->(</mo><mn>p</mn></math></p> 27 28 <p>There should be 4/18em horizontal gaps around the middle rectangles:</p> 29 <p><math><mn>p</mn><mo>&<!-- COMMENT -->&</mo><mn>p</mn></math></p> 30 <p><math><mn>p</mn><mo id="dynamic-text-add-2">&</mo><mn>p</mn></math></p> 31 32 <script src="/mathml/support/feature-detection.js"></script> 33 <script> 34 MathMLFeatureDetection.ensure_for_match_reftest("has_operator_spacing"); 35 36 let mo = document.getElementById("dynamic-add"); 37 mo.appendChild(document.createElement("span")); 38 39 mo = document.getElementById("dynamic-text-add"); 40 mo.appendChild(document.createTextNode("=")); 41 42 mo = document.getElementById("dynamic-text-add-2"); 43 mo.appendChild(document.createTextNode("&")); 44 45 mo = document.getElementById("dynamic-remove"); 46 mo.removeChild(mo.firstElementChild); 47 48 document.documentElement.classList.remove('reftest-wait'); 49 </script> 50 </body> 51 </html>