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/layout-algorithm/flexible-column-track-intrinsic-sizing-001-crash.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<meta charset="utf-8">
<link rel="author" title="Sammy Gill" href="mailto:sammy.gill@apple.com">
<meta name="assert" content="A grid whose first column is a flexible (fr) track can be sized under a max-content constraint when a grid item's max-content contribution is smaller than the flexible track's base size, without crashing.">
<style>
#grid {
display: grid;
grid-template-columns: 1fr;
width: fit-content;
}
#grid > div {
height: 50px;
background: green;
}
#grid > div > div {
height: 50px;
}
.wide { width: 100px; }
.narrow { width: 40px; }
</style>
<p>Test passes if there is a filled green square.</p>
<div id="grid">
<div><div class="wide"></div></div>
<div><div class="narrow"></div></div>
</div>