math-style-001.tentative.html (1629B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>math-style</title> 5 <meta charset="utf-8"> 6 <link rel="help" href="https://github.com/w3c/csswg-drafts/issues/3746"> 7 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#the-math-style-property"> 8 <meta name="assert" content="Check the resolved value of math-style"> 9 <script src="/resources/testharness.js"></script> 10 <script src="/resources/testharnessreport.js"></script> 11 <script> 12 function mathStyle(id) { 13 return window.getComputedStyle(document.getElementById(id)). 14 getPropertyValue("math-style"); 15 } 16 setup({ explicit_done: true }); 17 window.addEventListener("load", function() { 18 test(function() { 19 assert_equals(mathStyle("initial"), "normal"); 20 }, "Initial value of math-style"); 21 test(function() { 22 assert_equals(mathStyle("specifiedInline"), "compact"); 23 assert_equals(mathStyle("specifiedDisplay"), "normal"); 24 }, "Specified values of math-style"); 25 test(function() { 26 assert_equals(mathStyle("inheritedInline"), "compact"); 27 assert_equals(mathStyle("inheritedDisplay"), "normal"); 28 }, "Inherited values of math-style"); 29 done(); 30 }); 31 </script> 32 </head> 33 <body> 34 <div id="log"></div> 35 <div id="initial"></div> 36 <div id="specifiedInline" style="math-style: compact"> 37 <div id="inheritedInline"></div> 38 </div> 39 <div id="specifiedDisplay" style="math-style: normal"> 40 <div id="inheritedDisplay"></div> 41 </div> 42 </body> 43 </html>