Source code
Revision control
Copy as Markdown
Other Tools
<!DOCTYPE html>
<html class=reftest-wait>
<title>View Transition - Large snapshot with smaller snapshot area</title>
<style>
    #gridContainer {
        display: grid;
        gap: 150px;
    }
    .gridItem {
        width: 350px;
        height: 350px;
        background-color: blue;
    }
</style>
<body>
    <!--This should not be blurry.-->
    <div id="gridContainer"></div>
</body>
<script>
    function takeScreenshot() {
        document.documentElement.removeAttribute("class");
    }
    async function runTest() {
        const gridContainer = document.getElementById('gridContainer');
        gridSize = 20;
        gridContainer.style.gridTemplateColumns = `repeat(${gridSize}, 350px)`;
        for (let i = 0; i < gridSize * gridSize; i++) {
            const div = document.createElement('div');
            div.classList.add('gridItem');
            gridContainer.appendChild(div);
        }
        requestAnimationFrame(() => requestAnimationFrame(takeScreenshot));
    }
    onload = () => requestAnimationFrame(runTest);
</script>
</html>