gecko-dev/layout/reftests/bugs/1381821.html

17 строки
446 B
HTML

<!DOCTYPE html>
<style>
div { color: green; }
.red > span { color: red; }
</style>
<div id="first"><span></span></div>
<div id="second"><span>This text should be green.</span></div>
<script>
getComputedStyle(second.firstChild).color;
getComputedStyle(first.firstChild).color;
second.className = "red";
getComputedStyle(second.firstChild).color;
first.className = "red";
second.className = "";
getComputedStyle(second.firstChild).color;
</script>