<!DOCTYPE html>
<html class=reftest-wait>
<title>View transitions: inline child with filter</title>
<link rel="help" href="https://www.w3.org/TR/css-view-transitions-1/">
<link rel="author" href="mailto:vmpstr@chromium.org">
<link rel="match" href="inline-child-with-filter-ref.html">
<script src="/common/reftest-wait.js"></script>

<style>
body { margin : 0; }
#target {
  width: 100px;
  height: 100px;
  background-color: grey;
  overflow-clip-margin: 40px;
  contain: paint;
  view-transition-name: target;
}

#child {
  position: relative;
  left: 100px;
  top: 100px;
  color: lightgreen;
  background-color: darkgreen;
  filter: blur(30px);
}

html::view-transition-group(root) { animation-duration: 300s; }
html::view-transition-old(target) {
  animation: unset;
  opacity: 1;
}
html::view-transition-new(target) {
  animation: unset;
  opacity: 0;
}
</style>

<div id="target">
  <span id="child">INLINEBOX</span>
</div>

<script>
async function runTest() {
  let transition = document.startViewTransition(async () => {
    document.getElementById("target").remove();
  });
  transition.ready.then(() => requestAnimationFrame(takeScreenshot));
}
onload = () => requestAnimationFrame(() => requestAnimationFrame(runTest));
</script>
