Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-view-transitions/layered-capture/box-model-capture-nested.tentative.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html class=reftest-wait>
<title>Box model is copied to group style</title>
<meta name=fuzzy content="maxDifference=0-10; totalPixels=0-200000">
<link rel="match" href="box-model-capture-nested-ref.html">
<script src="/common/reftest-wait.js"></script>
<style>
* {
/* Will add tests for different sizing once the spec is resolved. */
box-sizing: border-box;
}
::view-transition {
background: rebeccapurple;
}
body {
margin: 0;
}
div {
width: 200px;
height: 200px;
background: green;
border: 10px solid blue;
}
.parent {
view-transition-name: parent;
padding: 48px 48px 48px 100px;
overflow: clip;
}
.child {
view-transition-name: child;
view-transition-group: parent;
border: 32px solid yellow;
padding: 48px;
}
.vt-new .parent {
border-width: 20px;
padding: 6px 48px 48px 100px;
}
::view-transition-group(*) {
animation-play-state: paused;
animation-timing-function: steps(2, start);
}
::view-transition-new(*), ::view-transition-old(*) {
animation: none;
}
</style>
<body>
<div class="parent">
<div class="child"></div>
</div>
<script>
document.startViewTransition(() => {
document.documentElement.classList.add("vt-new");
}).ready.then(() => takeScreenshot());
</script>
</body>