wm-propagation-body-computed-root.html (1238B)
1 <!DOCTYPE html> 2 <meta charset="UTF-8"> 3 <title>CSS Writing Modes Test: Computed writing-mode for html element when writing mode for body propagated to viewport</title> 4 <link rel="author" title="Rune Lillesveen" href="mailto:rune@opera.com"> 5 <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#principal-flow"> 6 <meta name="assert" content="Test that propagating writing-mode from body to viewport does not affect the computed writing-mode of the html element"> 7 <script src="/resources/testharness.js"></script> 8 <script src="/resources/testharnessreport.js"></script> 9 <style> 10 .vertical-lr { writing-mode: vertical-lr } 11 </style> 12 <body class="vertical-lr"> 13 <script> 14 test(function() { 15 assert_equals(getComputedStyle(document.body).writingMode, "vertical-lr"); 16 }, "Check computed writing-mode for body element."); 17 18 test(function() { 19 assert_not_equals(getComputedStyle(document.documentElement).writingMode, "vertical-lr"); 20 }, "Check computed writing-mode for html root element."); 21 22 test(function() { 23 document.body.className = ""; 24 assert_not_equals(getComputedStyle(document.body).writingMode, "vertical-lr"); 25 }, "Check computed writing-mode for body element when style no longer applies."); 26 </script>