blob: 7c6f03464193383f45b39c30fcc10686b95af828 [file] [log] [blame]
<!DOCTYPE html>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<style>
div {
width: 100px;
height: 100px;
}
#firstdiv {
--b: var(--b);
--a: var(--b, green);
background-color: var(--a,red);
}
#seconddiv {
--c: var(--c);
--d: var(--c, green);
background-color: var(--d,red);
}
</style>
<div id=firstdiv></div>
<div id=seconddiv></div>
<script>
test(function() {
assert_equals(getComputedStyle(firstdiv).backgroundColor, 'rgb(0, 128, 0)');
assert_equals(getComputedStyle(seconddiv).backgroundColor, 'rgb(0, 128, 0)');
}, 'custom property cycles are marked invalid in the same way, independent of ordering.');
</script>