| 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 background-color: var(--x); | |
| 12 } | |
| 13 #targetA { | |
| 14 animation: test 10s -2.5s; | |
| 15 } | |
| 16 #targetB { | |
| 17 animation: test 10s -7.5s; | |
| 18 } | |
| 19 </style> | |
| 20 <div id="targetA"></div> | |
| 21 <div id="targetB"></div> | |
| 22 <script> | |
| 23 test(() => { | |
| 24 assert_equals(getComputedStyle(targetA).getPropertyValue('--x'), ' green'); | |
| 25 assert_equals(getComputedStyle(targetB).getPropertyValue('--x'), ' lime'); | |
| 26 }, 'CSS Animations on custom properties should be applied'); | |
| 27 | |
| 28 test(() => { | |
| 29 assert_equals(getComputedStyle(targetA).backgroundColor, 'rgb(0, 128, 0)'); | |
| 30 assert_equals(getComputedStyle(targetB).backgroundColor, 'rgb(0, 255, 0)'); | |
| 31 }, 'CSS Animations on custom properties should be reflected in var() references'
); | |
| 32 </script> | |
| OLD | NEW |