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/grid-relayout-with-nested-grid.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html class="reftest-wait">
<head>
<meta charset="utf-8">
<link rel="author" title="Brandon Stewart" href="mailto:brandonstewart@apple.com">
<link rel="match" href="grid-relayout-with-nested-grid-ref.html">
<meta name="assert" content="Ensure text does not overflow upon re-layout of grid">
</head>
<style>
.grid {
display: grid;
grid-template-columns: minmax(min-content, 100px) auto;
}
.nested_grid {
border: 5px solid;
display: grid;
justify-items: baseline;
overflow-wrap: break-word;
}
</style>
<body>
<div class=grid>
<div id="extra_div1">
<div>
<div class=nested_grid><p>This content will overflow.</p></div>
</div>
</div>
</div>
</body>
<script>
/* Force a re-layout */
document.body.offsetHeight;
document.getElementById("extra_div1").appendChild(document.createElement("p"));
document.documentElement.classList.remove("reftest-wait");
forceLayout();
</script>
</html>