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/nested-overflow.tentative.sub.html?overflow=clip&margin=0&contain=none&radius=0 - WPT Dashboard Interop Dashboard
- /css/css-view-transitions/layered-capture/nested-overflow.tentative.sub.html?overflow=clip&margin=0&contain=none&radius=10px - WPT Dashboard Interop Dashboard
- /css/css-view-transitions/layered-capture/nested-overflow.tentative.sub.html?overflow=clip&margin=10px&contain=non&radius=0 - WPT Dashboard Interop Dashboard
- /css/css-view-transitions/layered-capture/nested-overflow.tentative.sub.html?overflow=clip&margin=10px&contain=none&radius=3px - WPT Dashboard Interop Dashboard
- /css/css-view-transitions/layered-capture/nested-overflow.tentative.sub.html?overflow=hidden&margin=0&contain=none&radius=0 - WPT Dashboard Interop Dashboard
- /css/css-view-transitions/layered-capture/nested-overflow.tentative.sub.html?overflow=hidden&margin=0&contain=none&radius=10px - WPT Dashboard Interop Dashboard
- /css/css-view-transitions/layered-capture/nested-overflow.tentative.sub.html?overflow=visible&margin=0&contain=none&radius=0 - WPT Dashboard Interop Dashboard
- /css/css-view-transitions/layered-capture/nested-overflow.tentative.sub.html?overflow=visible&margin=0&contain=paint&radius=0 - WPT Dashboard Interop Dashboard
- /css/css-view-transitions/layered-capture/nested-overflow.tentative.sub.html?overflow=visible&margin=20px&contain=paint&radius=0 - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html class=reftest-wait>
<title>Overflow should clip nested elements</title>
<meta name=fuzzy content="maxDifference=0-255; totalPixels=0-515">
<link rel="match" href="nested-overflow-ref.sub.html">
<meta name="variant" content="?overflow=hidden&margin=0&contain=none&radius=0">
<meta name="variant" content="?overflow=visible&margin=0&contain=none&radius=0">
<meta name="variant" content="?overflow=visible&margin=0&contain=paint&radius=0">
<meta name="variant" content="?overflow=visible&margin=20px&contain=paint&radius=0">
<meta name="variant" content="?overflow=clip&margin=0&contain=none&radius=0">
<meta name="variant" content="?overflow=clip&margin=10px&contain=non&radius=0">
<meta name="variant" content="?overflow=clip&margin=0&contain=none&radius=10px">
<meta name="variant" content="?overflow=clip&margin=10px&contain=none&radius=3px">
<meta name="variant" content="?overflow=hidden&margin=0&contain=none&radius=10px">
<script src="/common/reftest-wait.js"></script>
<style>
body {
margin: 0;
}
div {
position: absolute;
width: 100px;
height: 100px;
}
.parent {
view-transition-name: parent;
overflow: {{GET[overflow]}};
contain: {{GET[contain]}};
overflow-clip-margin: {{GET[margin]}};
border-radius: {{GET[radius]}};
background: green;
}
.child {
view-transition-name: child;
view-transition-group: parent;
background: blue;
top: 50px;
left: 50px;
}
::view-transition-old(*),
::view-transition-new(*) {
animation-play-state: paused;
}
</style>
<body>
<div class="parent">
<div class="child"></div>
</div>
<script>
onload = async() => {
document.startViewTransition().ready.then(() => takeScreenshot());
}
</script>
</body>