Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<html class=reftest-wait>
<title>Borders should not affect snapshot position</title>
<link rel="match" href="border-offset-ref.tentative.html">
<script src="/common/reftest-wait.js"></script>
<script src="resources/compute-test.js"></script>
<style>
html {
view-transition-name: none;
}
body {
margin: 0;
}
div {
position: absolute;
}
.parent {
view-transition-name: parent;
border: 10px solid black;
background: green;
padding: 20px;
width: 40px;
height: 40px;
box-sizing: content-box;
}
.child {
width: 30px;
padding-left: 6px;
height: 36px;
background: yellow;
border: 2px dashed blue;
view-transition-group: parent;
}
::view-transition-old(*),
::view-transition-new(*),
::view-transition-group(*) {
animation-play-state: paused;
}
::view-transition-group(parent) {
overflow: clip;
}
</style>
<body>
<div class="parent">
<div class="child"></div>
</div>
<script>
const transition = document.startViewTransition(() => {
document.documentElement.classList.add("vt-new");
});
transition.ready.then(() => takeScreenshot());
</script>
</body>