| rune@opera.com | 156c5e9 | 2017-06-28 09:44:59 | [diff] [blame] | 1 | <!DOCTYPE html> |
| 2 | <meta charset=utf-8> |
| 3 | <title>CSS Cascading and Inheritance test: Root element inherits from initial values</title> |
| 4 | <link rel="author" title="Rune Lillesveen" href="mailto:rune@opera.com"> |
| 5 | <link rel="help" href="https://www.w3.org/TR/css3-cascade/#inheriting"> |
| 6 | <script src="/resources/testharness.js"></script> |
| 7 | <script src="/resources/testharnessreport.js"></script> |
| 8 | <style> |
| 9 | html { |
| 10 | z-index: inherit; |
| 11 | position: inherit; |
| 12 | overflow: inherit; |
| 13 | background-color: inherit; |
| 14 | } |
| 15 | body { |
| 16 | overflow: scroll; |
| 17 | background-color: pink; |
| 18 | } |
| 19 | </style> |
| 20 | <script> |
| 21 | test(function() { |
| 22 | assert_equals(getComputedStyle(document.documentElement).zIndex, "auto"); |
| 23 | }, "z-index:inherit on root element should compute to 'auto'."); |
| 24 | |
| 25 | test(function() { |
| 26 | assert_equals(getComputedStyle(document.documentElement).position, "static"); |
| 27 | }, "position:inherit on root element should compute to 'static'."); |
| 28 | |
| 29 | test(function() { |
| 30 | assert_equals(getComputedStyle(document.documentElement).overflow, "visible"); |
| 31 | }, "overflow:inherit on root element should compute to 'visible'."); |
| 32 | |
| 33 | test(function() { |
| 34 | assert_equals(getComputedStyle(document.documentElement).backgroundColor, "rgba(0, 0, 0, 0)"); |
| 35 | }, "background-color:inherit on root element should compute to 'rgba(0, 0, 0, 0)'."); |
| 36 | </script> |