<!DOCTYPE html>
<link rel="match" href="../reference/ref-filled-green-100px-square-only.html">
<link rel="help" href="https://crbug.com/1040069">
<meta name="assert" content="This test checks that a dynamic change relative position paints the grid correctly."/>
<style>
#target {
display: grid;
grid-template-columns: repeat(auto-fit, 50px);
position: relative;
top: 10px;
}
</style>
<p>Test passes if there is a filled green square.</p>
<div id="target">
<div style="width: 100px; height: 100px; background: green;"></div>
</div>
<script>
document.body.offsetTop;
document.getElementById('target').style.top = '0px';
</script>