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: 200px; |
| 8 --bar: { |
| 9 background-color: green; |
| 10 }; |
| 11 --foo: { |
| 12 background-color: red; |
| 13 @apply --bar; |
| 14 }; |
| 15 @apply --foo; |
| 16 } |
| 17 </style> |
| 18 <div id=e> |
| 19 </div> |
| 20 <script> |
| 21 test(function(){ |
| 22 assert_equals(getComputedStyle(e).backgroundColor, "rgb(0, 128, 0)"); |
| 23 assert_equals(getComputedStyle(e).width, "100px"); |
| 24 assert_equals(getComputedStyle(e).height, "200px"); |
| 25 assert_equals(getComputedStyle(e).getPropertyValue("--foo"), " { background-
color: red; background-color: green; }"); |
| 26 }, "@apply rules can be used inside variables"); |
| 27 </script> |
OLD | NEW |