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/top-layer-parent-opacity.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html>
<title>Test that parent opacity does not affect top layer elements</title>
<meta charset="utf-8">
<link rel="match" href="green-dialog-and-backdrop.html">
<style>
body { background: red; }
#parent {
opacity: 0;
}
dialog::backdrop,
dialog {
background: green;
outline: none;
}
</style>
<body>
<div id="parent">
<dialog>PASS if no red shows</dialog>
</div>
<script>
document.querySelector("dialog").showModal();
</script>
</body>
</html>