Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /fullscreen/rendering/backdrop-inherit.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html class=reftest-wait>
<title>::backdrop inherits style from the fullscreen element</title>
<link rel=match href="backdrop-green-ref.html">
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<style>
body {
--bg: red;
}
div {
--bg: green;
}
div::backdrop {
background: var(--bg);
}
</style>
<div></div>
<script>
document.addEventListener('fullscreenchange', () => {
document.documentElement.classList.remove('reftest-wait');
});
test_driver.bless('fullscreen', () => {
document.querySelector('div').requestFullscreen();
});
</script>