Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<html>
<title>Test that parent overflow: scroll; does not affect top layer elements</title>
<meta charset="utf-8">
<link rel="author" title="Tim Nguyen" href="https://github.com/nt1m">
<link rel="match" href="green-dialog-and-backdrop.html">
<style>
body { background: red; }
#parent {
max-width: 0;
max-height: 0;
width: 0;
height: 0;
overflow: scroll;
position: absolute;
}
dialog::backdrop,
dialog {
background: green;
position: absolute;
outline: none;
}
</style>
<body>
<div id="parent">
<dialog>PASS if no red shows</dialog>
</div>
<script>
document.querySelector("dialog").showModal();
</script>
</body>
</html>