blob: fdb597297c202535708c11fde822902bd5261165 [file] [log] [blame]
<!doctype html>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<style>
#e1 {
--props: {
width: 100px;
background-color: red;
}
}
#e2 {
--tmp: {
--props: {
width: 0px;
@apply --props;
background-color: green;
height: 200px;
}
};
@apply --tmp;
}
#e3 {
@apply --props;
}
</style>
<div id=e1>
<div id=e2>
<div id=e3>
</div>
</div>
</div>
<script>
test(function(){
assert_equals(getComputedStyle(e3).backgroundColor, "rgb(0, 128, 0)");
assert_equals(getComputedStyle(e3).width, "100px");
assert_equals(getComputedStyle(e3).height, "200px");
}, "Custom property sets can be extended with the (self-referential) cascade trick");
</script>