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/border-image.tentative.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html class=reftest-wait>
<title>Tree effects are captured as group style</title>
<meta name=fuzzy content="maxDifference=0-10; totalPixels=0-200000">
<link rel="match" href="border-image-ref.tentative.html">
<script src="/common/reftest-wait.js"></script>
<style>
* {
box-sizing: border-box;
}
html {
view-transition-name: none;
}
body {
margin: 0;
}
.target {
width: 100px;
height: 100px;
margin: 30px;
background: green;
overflow: hidden;
border: 2px solid;
border-image: linear-gradient(red, blue) 2 / 10px;
}
html.vt-new .target {
border-image: linear-gradient(yellow, green) 20 / 10px;
}
html::view-transition-image-pair(*) {
inset: 5px;
}
.override {
view-transition-name: override;
}
.passthrough {
view-transition-name: passthrough;
}
.animate {
view-transition-name: animate;
}
.at-end {
view-transition-name: at-end;
}
html::view-transition-group(*) {
animation-play-state: paused;
}
html::view-transition-group(override) {
border: 8px groove;
outline: none;
border-radius: 2px;
background: grey;
border-image: linear-gradient(green, green) 8 / 3ppx;
animation: none;
}
html::view-transition-group(animate),
html::view-transition-old(animate),
html::view-transition-new(animate)
{
animation-timing-function: steps(2, start);
animation-play-state: paused;
animation-duration: 100s;
}
html::view-transition-group(at-end),
html::view-transition-old(at-end),
html::view-transition-new(at-end)
{
animation-timing-function: steps(1, start);
animation-play-state: paused;
animation-duration: 100s;
}
html::view-transition-group(passthrough),
html::view-transition-old(passthrough),
html::view-transition-new(passthrough)
{
animation-timing-function: steps(1, end);
animation-play-state: paused;
animation-duration: 100s;
}
html::view-transition {
background: lightpink;
}
</style>
<body>
<div class="passthrough target"></div>
<div class="at-end target"></div>
<div class="animate target"></div>
<div class="override target"></div>
<script>
const transition = document.startViewTransition(() => {
document.documentElement.classList.add("vt-new");
});
transition.ready.then(() => takeScreenshot());
</script>
</body>