Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<!-- Any copyright is dedicated to the Public Domain.
<meta charset="utf-8">
<title>Image within a grid with a size that depends on the containing block should stretch, but not size the grid tracks</title>
<link rel="author" href="mailto:emcdonough@mozilla.com">
<link rel="match" href="../../reference/ref-filled-green-100px-square.xht">
<style>
#grid {
display: inline-grid;
grid-template-columns: minmax(auto, 0);
grid-template-rows: minmax(auto, 0);
width: 200px;
}
</style>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div id="grid">
<img id="img" src="support/100x100-green.png">
<div style="background-color: red; aspect-ratio: 1;">
</div>