title: Flex-wrap with dynamic height
body: <p>I'm trying to get the <code>div</code> elements to <strong>distribute horizontally</strong> when the height of the <code>.container</code> meets the bottom of the <code>.resize</code> wrapper. </p>
  
  <p>When I drag the window to shrink the height of the <code>.container</code>, I want to be to also shrink the <code>.resize</code> wrapper when the bottom of the <code>.container</code> meets the bottom of the <code>.resize</code> wrapper so that the elements <code>flex-wrap</code> and distribute horizontally in proportion to the dynamic height of the <code>.container</code>.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>body {
    position: absolute;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
  }
  .container {
    flex: 1;
    border: 2px solid blue;
  }
  .resize {
    display: flex;
    height: auto;
    flex-direction: column;
    flex-wrap: wrap;
    border: 2px solid #f00;
  }
  
  .resize &gt; div {
    border: 2px solid #555;
    flex: 0 0 auto;
    background-color: #ccc;
    height: 100px;
    width: 100px;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="container"&gt;
    &lt;div class="resize"&gt;
      &lt;div&gt;1&lt;/div&gt;
      &lt;div&gt;2&lt;/div&gt;
      &lt;div&gt;3&lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>