| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../../resources/testharness.js"></script> |
| 3 <script src="../../resources/testharnessreport.js"></script> |
| 4 <style> |
| 5 @keyframes test { |
| 6 from { --x: green; } |
| 7 to { --x: lime; } |
| 8 } |
| 9 div { |
| 10 --x: red; |
| 11 --y: var(--x); |
| 12 background-color: var(--y); |
| 13 } |
| 14 #targetA { |
| 15 animation: test 10s -2.5s; |
| 16 } |
| 17 #targetB { |
| 18 animation: test 10s -7.5s; |
| 19 } |
| 20 </style> |
| 21 <div id="targetA"></div> |
| 22 <div id="targetB"></div> |
| 23 <script> |
| 24 test(() => { |
| 25 assert_equals(getComputedStyle(targetA).getPropertyValue('--y'), ' green'); |
| 26 assert_equals(getComputedStyle(targetB).getPropertyValue('--y'), ' lime'); |
| 27 }, 'CSS Animations on var() chained custom properties should be applied'); |
| 28 |
| 29 test(() => { |
| 30 assert_equals(getComputedStyle(targetA).backgroundColor, 'rgb(0, 128, 0)'); |
| 31 assert_equals(getComputedStyle(targetB).backgroundColor, 'rgb(0, 255, 0)'); |
| 32 }, 'CSS Animations on var() chained custom properties should be reflected in var
() references'); |
| 33 </script> |
| OLD | NEW |