blob: 8d118c23b17b4981abab08f2d76c38a3b577bc9e [file] [log] [blame]
<!DOCTYPE html>
<link rel="match" href="grid-container-scroll-accounts-for-auto-margin-expected.html">
<style>
body {
display: grid;
grid-template-columns: auto;
grid-template-rows: 1fr auto;
height: 100vh;
}
.item1 {
margin: 0px auto;
}
.item2 {
background-color: cyan;
height: 50px;
}
</style>
<div class="item1">item1</div>
<div class="item2">item2</div>
<script>
document.body.style = "overflow: hidden;";
document.body.offsetLeft;
document.body.style = "overflow: auto;";
</script>