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/abspos/grid-abspos-sibling-of-anonymous-grid-item-001.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<meta charset="utf-8">
<link rel="match" href="grid-abspos-sibling-of-anonymous-grid-item-001-ref.html">
<meta name="assert" content="Showing an absolutely positioned child of a grid container after layout does not change the layout of its sibling anonymous grid item.">
<style>
div {
background-color: green;
height: 20px;
width: 20px;
font-size: 12px;
color: transparent;
font-family: Monospace;
}
.grid {
display: grid;
}
.out_of_flow {
display: none;
position: absolute;
margin-top: 20px;
}
</style>
<div class=grid>
PASS if no
<div id=show_this class=out_of_flow>gap</div>
</div>
<script>
document.body.offsetHeight;
show_this.style.display = "block";
</script>