displaystyle-014.html (2074B)
1 <!DOCTYPE html> 2 <html class="reftest-wait"> 3 <head> 4 <title>displaystyle</title> 5 <meta charset="utf-8"> 6 <link rel="help" href="https://w3c.github.io/mathml-core/#the-displaystyle-and-scriptlevel-attributes"> 7 <link rel="help" href="https://w3c.github.io/mathml-core/#style-change-mstyle"> 8 <link rel="help" href="https://w3c.github.io/mathml-core/#underscripts-and-overscripts-munder-mover-munderover"> 9 <link rel="help" href="https://w3c.github.io/mathml-core/#operator-fence-separator-or-accent-mo"> 10 <link rel="help" href="https://w3c.github.io/mathml-core/#legacy-mathml-style-attributes"> 11 <link rel="help" href="https://w3c.github.io/mathml-core/#fractions-mfrac"> 12 <link rel="match" href="displaystyle-014-ref.html"/> 13 <meta name="assert" content="Test dynamic change of mathbackground on an operator does not interfer with its displaystyle"> 14 <script src="/mathml/support/fonts.js"></script> 15 <script type="text/javascript"> 16 function doTest() { 17 document.body.offsetTop; // Update layout 18 document.getElementById('mathOperator'). 19 setAttribute('mathbackground', 'red'); 20 document.documentElement.removeAttribute("class"); 21 } 22 window.addEventListener("load", () => { loadAllFonts().then(doTest); }); 23 </script> 24 <link rel="stylesheet" href="/fonts/ahem.css"> 25 <style> 26 math { 27 font: 25px Ahem; 28 } 29 </style> 30 </head> 31 <body> 32 33 <!-- See https://bugzilla.mozilla.org/show_bug.cgi?id=832800 --> 34 <math> 35 <mstyle displaystyle="true"> 36 <mfrac> 37 <mrow> 38 <mn>X</mn> 39 <mo id="mathOperator">+</mo> 40 <mfrac> 41 <mrow><mn>X</mn></mrow> 42 <mrow><mn>X</mn></mrow> 43 </mfrac> 44 </mrow> 45 <mrow> 46 <mn>X</mn> 47 </mrow> 48 </mfrac> 49 </mstyle> 50 </math> 51 52 <script src="/mathml/support/feature-detection.js"></script> 53 <script>MathMLFeatureDetection.ensure_for_match_reftest("has_mfrac");</script> 54 </body> 55 </html>