author Daniel Holbert <>
Fri, 30 Mar 2018 16:59:36 -0700
changeset 410898 16eaa1e05dacc953f2e8fc9e662f55dc188ec27f
permissions -rw-r--r--
Bug 1105111 part 5: Add reftests for 'flex-basis:content' in column-oriented flex container. r=mats MozReview-Commit-ID: 6TMrmisHOUr

<!DOCTYPE html>
     Any copyright is dedicated to the Public Domain.
    CSS Test: Testing "flex-basis: content" in a column-oriented flex container
  <meta charset="utf-8">
  <link rel="author" title="Daniel Holbert" href="">
  <link rel="help" href="">
  <link rel="match" href="flexbox-flex-basis-content-002-ref.html">
  <link rel="stylesheet" type="text/css" href="support/ahem.css">
  .container {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 2px solid purple;
    padding: 2px;
    margin-right: 2em;
    width: 50px;
    height: 200px;
    float: left;

  .container > * {
    /* All flex items have "flex-basis: content" (and zero flex-shrink and
       min-main-size, to avoid any influence from those). */
    flex-basis: content;
    flex-shrink: 0;
    min-height: 0;
    border: 2px solid teal;

  .smallText { font: 10px Ahem; }
  .bigText   { font: 20px Ahem; }
  .spacerChild::before {
    content: '';
    display: block;
    background: brown;
    height: 10px;
    width: 10px;
  .justPadding {
    /* Empty div with 5px padding on each side */
    padding: 5px;
    background: cyan;
  canvas { background: fuchsia }
<!-- Flex items have unspecified size properties: -->
<div class="container">
  <div class="smallText">a b</div>
  <div class="bigText">c</div>
  <div class="spacerChild"></div>
  <div class="justPadding"></div>
  <canvas height="20"></canvas>

<!-- Various specified main-size values (should be ignored): -->
<div class="container">
  <div class="smallText"    style="height: 0px">a b</div>
  <div class="bigText"      style="height: 40px">c</div>
  <div class="spacerChild"  style="height: 20px"></div>
  <div class="justPadding"  style="height: 10px"></div>
  <canvas height="20"       style="height: 8px"></canvas>

<!-- Various specified cross-size values (should be honored): -->
<div class="container">
  <div class="smallText"    style="width: 0px">a b</div>
  <div class="bigText"      style="width: 40px">c</div>
  <div class="spacerChild"  style="width: 20px"></div>
  <div class="justPadding"  style="width: 10px"></div>
  <canvas height="20"       style="width: 8px"></canvas>