Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
            
- /css/css-position/backdrop-inherit-rendered.html - WPT Dashboard Interop Dashboard
 
 
<!DOCTYPE html>
<title>CSS Position Test: ::backdrop inherits from originating element - rendering</title>
<link rel="match" href="backdrop-inherit-rendered-ref.html">
<style>
  dialog {
    --bg: green;
    inset: 100px;
  }
  dialog::backdrop {
    background-color: var(--bg);
    inset: inherit;
  }
</style>
<dialog>Green backdrop with 100px inset</dialog>
<script>
  document.querySelector("dialog").showModal();
</script>