Skip to content

Truly independent web browser

1000 B
Raw Blame
<!DOCTYPE html>
<meta charset="utf-8">
<title>Automatic minimum size of flex item with stretch cross size</title>
<link rel="author" title="Oriol Brufau" href="mailto:[email protected]">
<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#stretch-fit-sizing">
<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#min-size-auto">
<link rel="match" href="../../../../../expected/wpt-import/css/css-sizing/stretch/../../reference/ref-filled-green-200px-square.html">
<meta assert="A definite `stretch` cross size can be transferred through the
  aspect ratio when computing the automatic minimum size of a flex item.">

<style>
div {
  display: flex;
  flex-direction: column;
  height: 200px;
  width: 200px;
  background: red;
}
canvas {
  width: stretch;
  align-self: start;
  flex-basis: 0;
  background: green;
}
</style>

<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div class="flex">
  <canvas width="100" height="100"></canvas>
</div>