wpt / css / css-flexbox / image-as-flexitem-size-006.html

Status: PASS | Duration: 3ms | Subtests: 18/18 | Open test on wpt.live | wpt.fyi

Data from commit:
708eb61 WPT runner: support mismatch reftests and multiple rel=match links (#665) (2026-08-09)

SubtestStatusMessage
.flexbox > img 1PASS
.flexbox > img 2PASS
.flexbox > img 3PASS
.flexbox > img 4PASS
.flexbox > img 5PASS
.flexbox > img 6PASS
.flexbox > img 7PASS
.flexbox > img 8PASS
.flexbox > img 9PASS
.flexbox > img 10PASS
.flexbox > img 11PASS
.flexbox > img 12PASS
.flexbox > img 13PASS
.flexbox > img 14PASS
.flexbox > img 15PASS
.flexbox > img 16PASS
.flexbox > img 17PASS
.flexbox > img 18PASS

/css/css-flexbox/image-as-flexitem-size-006.html

<!DOCTYPE html>
<!--
     Any copyright is dedicated to the Public Domain.
     http://creativecommons.org/publicdomain/zero/1.0/
-->
<html>
  <head>
    <meta charset="utf-8">
    <title>
      CSS Test: Testing how explicit main-size & cross-size constraints
      influence sizing on non-stretched flexible flex item w/ intrinsic ratio.
    </title>
    <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
    <link rel="author" title="David Grogan" href="mailto:dgrogan@chromium.org">
    <link rel="help" href="https://www.w3.org/TR/css-flexbox-1/#hypothetical-main-size">
    <link rel="help" href="https://www.w3.org/TR/css-flexbox-1/#hypothetical-cross-size">
    <style>
      .flexbox {
        display: flex;
        flex-direction: column;
        border: 1px solid black;
        margin: 0 2px 2px 0; /* (Just for spacing things out, visually) */
        width: 40px;
        height: 40px;

        justify-content: flex-start;
        align-items: flex-start;

        float: left; /* For testing in "rows" */
      }
      br { clear: both; }

      .flexbox > * {
        flex: 1;

        /* Disable "min-width:auto"/"min-height:auto" to focus purely on
           later channels of influence. */
        min-width: 0;
        min-height: 0;
      }
    </style>
    <script src="/resources/testharness.js"></script>
    <script src="/resources/testharnessreport.js"></script>
    <script src="/resources/check-layout-th.js"></script>
  </head>
  <body onload="checkLayout('.flexbox > img')">
    <!-- NOTE: solidblue.png has an intrinsic size of 16px by 16px. -->

    <!-- Row 1: no special sizing: -->
    <div class="flexbox">
      <img src="support/solidblue.png" data-expected-width="40" data-expected-height="40">
    </div>
    <br>

    <!-- Row 2: Specified main-size, cross-size, or flex-basis: -->
    <div class="flexbox">
      <img src="support/solidblue.png" style="width: 30px" data-expected-width="30" data-expected-height="40">
    </div>
    <div class="flexbox">
      <img src="support/solidblue.png" style="height: 30px" data-expected-width="40" data-expected-height="40">
    </div>
    <div class="flexbox">
      <img src="support/solidblue.png" style="flex: 1 1 30px" data-expected-width="40" data-expected-height="40">
    </div>
    <br>

    <!-- Row 3: min main-size OR min cross-size, or both -->
    <div class="flexbox">
      <img src="support/solidblue.png" style="min-width: 34px" data-expected-width="40" data-expected-height="40">
    </div>
    <div class="flexbox">
      <img src="support/solidblue.png" style="min-height: 34px" data-expected-width="40" data-expected-height="40">
    </div>
    <div class="flexbox">
      <img src="support/solidblue.png" style="min-width: 30px;
                                              min-height: 34px" data-expected-width="40" data-expected-height="40">
    </div>
    <div class="flexbox">
      <img src="support/solidblue.png" style="min-width: 34px;
                                              min-height: 30px" data-expected-width="40" data-expected-height="40">
    </div>
    <br>

    <!-- Row 4: max main-size OR max cross-size, or both -->
    <div class="flexbox">
      <img src="support/solidblue.png" style="max-width: 10px" data-expected-width="10" data-expected-height="40">
    </div>
    <div class="flexbox">
      <img src="support/solidblue.png" style="max-height: 10px" data-expected-width="10" data-expected-height="10">
    </div>
    <div class="flexbox">
      <img src="support/solidblue.png" style="max-width: 10px;
                                              max-height: 6px" data-expected-width="6" data-expected-height="6">
    </div>
    <div class="flexbox">
      <img src="support/solidblue.png" style="max-width: 6px;
                                              max-height: 10px" data-expected-width="6" data-expected-height="10">
    </div>
    <br>

    <!-- Row 5: min main-size vs. max cross-size, & vice versa -->
    <div class="flexbox">
      <img src="support/solidblue.png" style="min-width: 30px;
                                              max-height: 10px" data-expected-width="30" data-expected-height="10">
    </div>
    <div class="flexbox">
      <img src="support/solidblue.png" style="max-width: 10px;
                                              min-height: 30px" data-expected-width="10" data-expected-height="40">
    </div>
    <br>

    <!-- Row 6: min|max main-size vs. explicit cross-size, & vice versa -->
    <div class="flexbox">
      <img src="support/solidblue.png" style="min-width: 30px;
                                              height: 10px" data-expected-width="40" data-expected-height="40">
    </div>
    <div class="flexbox">
      <img src="support/solidblue.png" style="width: 30px;
                                              max-height: 10px" data-expected-width="30" data-expected-height="10">
    </div>
    <div class="flexbox">
      <img src="support/solidblue.png" style="max-width: 10px;
                                              height: 30px" data-expected-width="10" data-expected-height="40">
    </div>
    <div class="flexbox">
      <img src="support/solidblue.png" style="width: 10px;
                                              min-height: 30px" data-expected-width="10" data-expected-height="40">
    </div>
  </body>
</html>