Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!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;
justify-items: stretch;
}
#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>