ax-height: fit-content" data-expected-height="510">
    <canvas width="10" height="20" data-expected-width="250" data-expected-height="500"></canvas>
  </div>
</div>
<div class="cb">
  <div class="test max-height" style="max-height: max-content" data-expected-height="510">
    <canvas width="10" height="20" data-expected-width="250" data-expected-height="500"></canvas>
  </div>
</div>
<div class="cb">
  <div class="test max-height stretch" data-expected-height="90">
    <canvas width="10" height="20" data-e