Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<html class=reftest-wait>
<title>Opacity should apply to the whole group</title>
<meta name=fuzzy content="maxDifference=0-255; totalPixels=0-515">
<link rel="match" href="nested-opacity-ref.html">
<script src="/common/reftest-wait.js"></script>
<style>
body {
margin: 0;
}
div {
position: absolute;
width: 100px;
height: 100px;
background: green;
}
.parent {
view-transition-name: parent;
opacity: 0.4;
will-change: opacity;
}
.child {
view-transition-name: child;
view-transition-group: parent;
top: 50px;
left: 50px;
}
</style>
<body>
<div class="parent">
<div class="child"></div>
</div>
<script>
onload = async () => {
const transition = document.startViewTransition();
await transition.updateCallbackDone;
transition.skipTransition();
await transition.finished;
takeScreenshot();
};
</script>
</body>