OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../../../resources/testharness.js"></script> |
| 3 <script src="../../../resources/testharnessreport.js"></script> |
| 4 <style> |
| 5 div { |
| 6 width: 100px; |
| 7 height: 100px; |
| 8 } |
| 9 #firstdiv { |
| 10 --green: green; |
| 11 --clr: var(--green); |
| 12 --foo: var(--clr); |
| 13 --bar: var(--clr); |
| 14 background-color: var(--bar); |
| 15 } |
| 16 #seconddiv { |
| 17 --green: green; |
| 18 --clr: var(--green); |
| 19 --bar: var(--clr); |
| 20 --foo: var(--clr); |
| 21 background-color: var(--bar); |
| 22 } |
| 23 </style> |
| 24 |
| 25 <div id="firstdiv"></div> |
| 26 <div id="seconddiv"></div> |
| 27 |
| 28 <script> |
| 29 test(function() { |
| 30 assert_equals(getComputedStyle(firstdiv).backgroundColor, 'rgb(0, 128, 0)'); |
| 31 assert_equals(getComputedStyle(seconddiv).backgroundColor, 'rgb(0, 128, 0)'); |
| 32 }, 'Background color needs to resolved to green independent of ordering of varia
ble declaration.'); |
| 33 </script> |
OLD | NEW |