| <!doctype html> |
| <script src="../../../resources/testharness.js"></script> |
| <script src="../../../resources/testharnessreport.js"></script> |
| <style> |
| div { |
| width: 100px; |
| height: 100px; |
| --foo: { |
| background-color: green; |
| } |
| } |
| </style> |
| <div id=e1 style="@apply --foo"></div> |
| <div id=e2 style="@apply --foo; height: 100px"></div> |
| <script> |
| test(function(){ |
| assert_equals(getComputedStyle(e1).backgroundColor, "rgb(0, 128, 0)"); |
| assert_equals(getComputedStyle(e2).backgroundColor, "rgb(0, 128, 0)"); |
| assert_equals(getComputedStyle(e2).height, "100px"); |
| }, "@apply should work when specified inside inline styles"); |
| </script> |