When collecting row-axis contributions from subgrid descendants, resolve the subgrid column metrics first so intrinsic height measurement uses the correct inline size. This prevents text from being measured as if it had no usable width, which inflated auto row sizes.
22 lines
486 B
HTML
22 lines
486 B
HTML
<!DOCTYPE html>
|
|
<style>
|
|
body {
|
|
margin: 0;
|
|
}
|
|
|
|
.outer {
|
|
display: grid;
|
|
outline: 2px solid red;
|
|
}
|
|
|
|
.subgrid {
|
|
display: grid;
|
|
grid-template-rows: subgrid;
|
|
}
|
|
|
|
img {
|
|
display: block;
|
|
width: 100%;
|
|
}
|
|
</style>
|
|
<div class="outer"><div class="subgrid"><img src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='800' height='40'><rect width='800' height='40' fill='green'/></svg>"></div></div>
|