| <!DOCTYPE html> |
| <html> |
| <head> |
| <title>math-script-level</title> |
| <meta charset="utf-8"> |
| <link rel="help" href="https://github.com/w3c/csswg-drafts/issues/3746"> |
| <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#the-math-script-level-property"> |
| <meta name="assert" content="Check the resolved value of math-script-level"> |
| <script src="/resources/testharness.js"></script> |
| <script src="/resources/testharnessreport.js"></script> |
| <script> |
| function mathScriptLevel(id) { |
| return window.getComputedStyle(document.getElementById(id)). |
| getPropertyValue("math-script-level"); |
| } |
| setup({ explicit_done: true }); |
| window.addEventListener("load", function() { |
| test(function() { |
| assert_equals(mathScriptLevel("initial"), "0"); |
| assert_equals(mathScriptLevel("initialFrom11"), "0"); |
| }, "Initial value of math-script-level"); |
| test(function() { |
| assert_equals(mathScriptLevel("inherited11"), "11"); |
| assert_equals(mathScriptLevel("inherited-7"), "-7"); |
| }, "Inherited values of math-script-level"); |
| test(function() { |
| assert_equals(mathScriptLevel("inherited9specifiedAutoInline"), "10"); |
| assert_equals(mathScriptLevel("inherited9specifiedAutoDisplay"), "9"); |
| }, "Specified math-script-level: auto"); |
| test(function() { |
| assert_equals(mathScriptLevel("specified11"), "11"); |
| assert_equals(mathScriptLevel("specified-7"), "-7"); |
| }, "Specified math-script-level: <integer>"); |
| test(function() { |
| assert_equals(mathScriptLevel("specifiedAdd10From5"), "15"); |
| assert_equals(mathScriptLevel("specifiedAdd-15From5"), "-10"); |
| }, "Specified math-script-level: add(<integer>)"); |
| done(); |
| }); |
| </script> |
| </head> |
| <body> |
| <div id="log"></div> |
| <div id="initial"></div> |
| <div id="specified11" style="math-script-level: 11"> |
| <div id="initialFrom11" style="math-script-level: initial"></div> |
| <div id="inherited11"></div> |
| </div> |
| <div id="specified-7" style="math-script-level: -7"> |
| <div id="inherited-7"></div> |
| </div> |
| <div style="math-script-level: 9"> |
| <div style="math-style: inline"> |
| <div id="inherited9specifiedAutoInline" style="math-script-level: auto" ></div> |
| </div> |
| <div style="math-style: display"> |
| <div id="inherited9specifiedAutoDisplay" style="math-script-level: auto" ></div> |
| </div> |
| </div> |
| <div style="math-script-level: 5"> |
| <div id="specifiedAdd10From5" style="math-script-level: add(10)"></div> |
| <div id="specifiedAdd-15From5" style="math-script-level: add(-15)"></div> |
| </div> |
| </body> |
| </html> |