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: red; |
| 9 --apply1: @apply; |
| 10 --apply2: --red; |
| 11 --red: { background-color: red; }; |
| 12 --foo: { |
| 13 background-color: green; |
| 14 var(--apply1) var(--apply2); |
| 15 }; |
| 16 @apply --foo; |
| 17 } |
| 18 </style> |
| 19 <div id=e> |
| 20 </div> |
| 21 <script> |
| 22 test(function(){ |
| 23 assert_equals(getComputedStyle(e).backgroundColor, "rgb(0, 128, 0)"); |
| 24 assert_equals(getComputedStyle(e).getPropertyValue("--foo"), " { background-
color: green; @apply --red; }"); |
| 25 }, "@apply inside custom properties don't get expanded if the @apply rule was "
+ |
| 26 "constructed from variable references"); |
| 27 </script> |
OLD | NEW |