blob: 4f85b082fd1d3a64c3b449b25fd5f3a21b3351d4 [file] [log] [blame]
<!DOCTYPE html>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<style>
header {
--x: black;
}
main {
--x: green;
}
button {
background: var(--x);
}
</style>
<header><button id='a'></button></header>
<main><button id='b'></button></header>
<script>
test(function() {
assert_equals(getComputedStyle(a).backgroundColor, 'rgb(0, 0, 0)');
assert_equals(getComputedStyle(b).backgroundColor, 'rgb(0, 128, 0)');
}, "uninherited properties don't reuse values when set to variables.");
</script>