Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<link rel="match" href="../reference/ref-filled-green-100px-square-only.html">
<meta name="assert" content="A fit-content sized block must recompute its width when its height changes, when its child is a flex container with a stretched aspect-ratio flex item.">
<p>Test passes if there is a filled green square.</p>
<div id="target" style="height: 50px; width: fit-content; background: green;">
<div style="display: flex; height: 100%; background: green;">
<div style="aspect-ratio: 1/1;"></div>
</div>
</div>
<script>
document.body.offsetTop;
document.getElementById('target').style.height = '100px';
</script>