OLD | NEW |
(Empty) | |
| 1 <!doctype html> |
| 2 <script src="../../../resources/testharness.js"></script> |
| 3 <script src="../../../resources/testharnessreport.js"></script> |
| 4 <style> |
| 5 #e { |
| 6 width: 100px; |
| 7 height: 100px; |
| 8 background-color: green; |
| 9 --a1: { @apply --a2; background-color: red; }; |
| 10 --a2: { @apply --a1; background-color: red; }; |
| 11 @apply --a1; |
| 12 @apply --a2; |
| 13 --b1: { @apply --b2; background-color: red; }; |
| 14 --b2: var(--b3); |
| 15 --b3: { var(--b1, background-color: red); }; |
| 16 @apply --b1; |
| 17 @apply --b2; |
| 18 @apply --b3; |
| 19 } |
| 20 </style> |
| 21 <div id=e> |
| 22 </div> |
| 23 <script> |
| 24 test(function(){ |
| 25 assert_equals(getComputedStyle(e).backgroundColor, "rgb(0, 128, 0)"); |
| 26 assert_equals(getComputedStyle(e).getPropertyValue("--a1"), ""); |
| 27 assert_equals(getComputedStyle(e).getPropertyValue("--a2"), ""); |
| 28 assert_equals(getComputedStyle(e).getPropertyValue("--b1"), ""); |
| 29 assert_equals(getComputedStyle(e).getPropertyValue("--b2"), ""); |
| 30 assert_equals(getComputedStyle(e).getPropertyValue("--b3"), ""); |
| 31 }, "Variable cycle detection works with @apply"); |
| 32 </script> |
OLD | NEW |