Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-grid/chrome-bug-001.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<link rel="match" href="../reference/ref-filled-green-100px-square-only.html">
<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>