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-uneven.tentative.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html class=reftest-wait>
<title>Uneven borders should be captured correctly</title>
<meta name=fuzzy content="maxDifference=0-255; totalPixels=0-515">
<link rel="match" href="border-uneven-ref.html">
<script src="/common/reftest-wait.js"></script>
<script src="resources/compute-test.js"></script>
<style>
* {
box-sizing: border-box;
}
html {
view-transition-name: none;
}
body {
margin: 0;
}
.target {
width: 100px;
height: 100px;
view-transition-name: parent;
border-left: 10px solid black;
border-top: 20px groove pink;
border-bottom-width: 1px;
border-bottom-style: dashed;
border-bottom-color: orange;
border-right: 2px solid yellow;
background: green;
}
.vt-new .target {
border: 5px solid blue;
border-right: 4px solid teal;
}
::view-transition {
background: rebeccapurple;
}
::view-transition-old(*),
::view-transition-new(*),
::view-transition-group(*) {
animation-play-state: paused;
}
::view-transition-group(parent) {
animation-timing-function: steps(2, start);
}
</style>
<body>
<div class="target"></div>
<script>
const transition = document.startViewTransition(() => {
document.documentElement.classList.add("vt-new");
});
transition.ready.then(() => takeScreenshot());
</script>
</body>