Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /html/semantics/interactive-elements/the-dialog-element/backdrop-in-flow.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<link rel="match" href="backdrop-in-flow-ref.html">
<style>
dialog {
visibility: hidden;
}
dialog::backdrop {
visibility: visible;
height: 100px;
width: 50px;
}
#left::backdrop {
position: static;
top: 100px;
left: 100px;
background: green;
}
#right::backdrop {
position: relative;
background: green;
top: 100px;
left: 150px;
}
</style>
<body>
Test that position 'static' or 'relative' for ::backdrop computes to 'absolute'.
The test passes if there is a single green box.
<dialog id="left"></dialog>
<dialog id="right"></dialog>
</div>
<script>
document.querySelector('#left').showModal();
document.querySelector('#right').showModal();
</script>
</body>