OLD | NEW |
(Empty) | |
| 1 <!doctype html> |
| 2 <script src="../../../resources/testharness.js"></script> |
| 3 <script src="../../../resources/testharnessreport.js"></script> |
| 4 <style> |
| 5 #e1 { |
| 6 --props: { |
| 7 width: 100px; |
| 8 background-color: red; |
| 9 } |
| 10 } |
| 11 #e2 { |
| 12 --props-copy: var(--props); |
| 13 } |
| 14 #e3 { |
| 15 --props: { |
| 16 @apply --props-copy; |
| 17 background-color: green; |
| 18 height: 200px; |
| 19 } |
| 20 } |
| 21 #e4 { |
| 22 @apply --props; |
| 23 } |
| 24 </style> |
| 25 <div id=e1> |
| 26 <div id=e2> |
| 27 <div id=e3> |
| 28 <div id=e4> |
| 29 </div> |
| 30 </div> |
| 31 </div> |
| 32 </div> |
| 33 <script> |
| 34 test(function(){ |
| 35 assert_equals(getComputedStyle(e4).backgroundColor, "rgb(0, 128, 0)"); |
| 36 assert_equals(getComputedStyle(e4).width, "100px"); |
| 37 assert_equals(getComputedStyle(e4).height, "200px"); |
| 38 }, "Custom property sets can be extended with the cascade trick"); |
| 39 </script> |
OLD | NEW |