blob: 0e577dc923278b18ef5c8d84bd0715b8dd7c9bb2 [file] [log] [blame]
<!DOCTYPE html>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<style>
#auto {
z-index: auto;
opacity: 0.9;
}
#one {
z-index: 1;
}
#inheritAuto, #inheritOne {
position: relative;
z-index: inherit;
}
</style>
<div id="auto">
<div id="inheritAuto"></div>
</div>
<div id="one">
<div id="inheritOne"></div>
</div>
<script>
test(() => {
assert_equals(getComputedStyle(inheritAuto).zIndex, 'auto');
assert_equals(getComputedStyle(inheritOne).zIndex, '1');
}, 'z-index should inherit the computed value');
</script>