<!DOCTYPE html> | |
<style> | |
dialog { | |
visibility: inherit; | |
background: red; | |
} | |
dialog::backdrop { | |
position: absolute; | |
top: 100px; | |
left: 100px; | |
height: 100px; | |
width: 100px; | |
visibility: inherit; | |
background: green; | |
} | |
</style> | |
<body> | |
Test that ::backdrop does not inherit from anything. The test passes if there is | |
a green box and no red. | |
<div style="visibility: hidden"> | |
<dialog></dialog> | |
</div> | |
<script> | |
document.querySelector('dialog').showModal(); | |
</script> | |
</body> |