title: Equal height rows in flex-direction: column
body: <p>I have a flex layout with two flex items, displayed as rows (<code>flex-direction: column</code>). The items should have a minimum height but they should maintain the same height it one of them needs to grow. See <a href="https://jsfiddle.net/958vxhox/" rel="nofollow noreferrer">this JSFiddle</a> and decrease the width of the result pane; this forces the second <code>.component</code> element to increase its height, but the height of the first <code>.component</code> element remains the same.</p>
  <p>Is it possible to force the flex items to maintain the same height? Please note that the main thing in this is the stacking of the two <code>.component</code> elements, which I couldn't achieve without <code>flex-direction: column</code>; <code>flex-direction: row</code> would have made the same height possible but the stacking does not work.</p>
  <p>Here is the result of what I have so far:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>div {
    border: 1px solid black;
    box-sizing: border-box;
  }
  .container {
    display: flex;
    flex-direction: column;
    align-content: stretch;
  }
  .component {
    min-height: 300px;
  }
  .left {
    margin-left: 50px;
    margin-top: 50px;
    margin-right: 100px;
    background-color: lightyellow;
  }
  .right {
    margin-left: 100px;
    margin-top: -250px;
    margin-right: 50px;
    background-color: lightgreen;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="container"&gt;
    &lt;div class="component left"&gt;
  
    &lt;/div&gt;
    &lt;div class="component right"&gt;
      &lt;p&gt;
        Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent sed orci scelerisque, scelerisque enim at, ullamcorper ipsum. Cras eget sapien mi. Aliquam ultrices, ligula ut mollis maximus, ligula massa imperdiet libero, at faucibus mauris ante non
        magna. Sed ex lacus, efficitur sit amet neque ut, venenatis hendrerit libero. Suspendisse ornare orci mi. Nulla iaculis egestas libero, eu tincidunt urna tristique et. Quisque nec odio non elit molestie facilisis.
      &lt;/p&gt;
      &lt;p&gt;
        Vestibulum scelerisque justo urna, a semper nisi sollicitudin in. Cras congue enim eu euismod semper. Proin consequat gravida felis, quis tincidunt massa pulvinar quis. Morbi nec diam eget orci vestibulum malesuada. Sed volutpat metus eget mattis commodo.
        Nulla facilisi. Praesent lectus mauris, consequat eu varius vitae, cursus vitae leo. Vivamus sagittis lacinia tortor eu ullamcorper. Integer eget velit magna. Duis vestibulum molestie posuere.
      &lt;/p&gt;
  
    &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>