Files
ladybird/Tests/LibWeb/Text/input/layout-tree-update/clear-inline-display-none-preserves-complex-selector-style.html

40 lines
938 B
HTML

<!DOCTYPE html>
<style>
#container {
position: relative;
width: 500px;
}
.outer .inner .target {
display: none;
position: absolute;
left: 0;
top: 40px;
width: 100%;
}
</style>
<div class="outer">
<div class="inner">
<div id="container">
<div id="target" class="target" style="display: none;">content</div>
</div>
</div>
</div>
<script src="../include.js"></script>
<script>
function snapshot(label) {
const cs = getComputedStyle(target);
println(
`${label} style=${target.getAttribute("style") || "(none)"} display=${cs.display} position=${cs.position} width=${cs.width} left=${cs.left} top=${cs.top}`
);
}
test(() => {
snapshot("initial");
target.style.display = "";
snapshot("after-display-empty");
target.style.display = "block";
snapshot("after-display-block");
});
</script>