60 lines
1.5 KiB
HTML
60 lines
1.5 KiB
HTML
<!DOCTYPE html>
|
|
<html class=reftest-wait>
|
|
<title>View transitions: inline child with overflowing shadow</title>
|
|
<link rel="help" href="https://drafts.csswg.org/css-view-transitions-1/">
|
|
<link rel="match" href="inline-child-with-overflow-shadow-ref.html">
|
|
<script src="/common/reftest-wait.js"></script>
|
|
<style>
|
|
:root { view-transition-name: none; }
|
|
::view-transition { background: rebeccapurple; }
|
|
body {
|
|
margin: 0;
|
|
}
|
|
|
|
.target {
|
|
width: 100px;
|
|
height: 200px;
|
|
position: absolute;
|
|
top: 100px;
|
|
left: 100px;
|
|
view-transition-name: target;
|
|
}
|
|
|
|
.child {
|
|
background: green;
|
|
font-size: 100px;
|
|
box-shadow: -20px -20px yellow;
|
|
}
|
|
|
|
html::view-transition-group(target) {
|
|
animation-play-state: paused;
|
|
}
|
|
html::view-transition-old(target),
|
|
html::view-transition-new(target) {
|
|
animation: unset;
|
|
opacity: 1;
|
|
}
|
|
|
|
html::view-transition-old(target) {
|
|
opacity: 0;
|
|
}
|
|
|
|
/* None of these should apply, so make everything red if it does */
|
|
html::view-transition-group(root) { animation: unset; opacity: 1; background: red; }
|
|
html::view-transition-image-pair(root) { visibility: hidden }
|
|
</style>
|
|
|
|
<div class=target>
|
|
<span class=child> </span>
|
|
</div>
|
|
|
|
<script>
|
|
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
|
|
|
|
async function runTest() {
|
|
document.startViewTransition(() =>
|
|
requestAnimationFrame(() => requestAnimationFrame(takeScreenshot)));
|
|
}
|
|
onload = () => requestAnimationFrame(() => requestAnimationFrame(runTest));
|
|
</script>
|
|
|