title: Change flex direction on wrap
body: <p>I am trying to use a nested flexbox layout in order to achieve the following layout when there is a certain amount of space:</p>
  
  <p><img src="https://i.stack.imgur.com/CgBzT.png" alt="Example"></p>
  
  <p>Then, when there isn't enough space, the right-hand side should wrap to a <em>row</em> layout instead of a <em>column</em> layout, so that the boxes are side-by-side when they wrap, example:</p>
  
  <p><img src="https://i.stack.imgur.com/MEhHu.png" alt="Small Layout"></p>
  
  <p>The idea is to have the boxes on the right 50% of the left content so that when they wrap underneath, they are the same combined size as the left content.</p>
  
  <p>However, I can't figure out how to do this via flexbox only. This is what I have so far, but if you resize the window you'll see that the boxes stay in the same direction:</p>
  
  <p><a href="http://jsfiddle.net/usLxshro/" rel="noreferrer">http://jsfiddle.net/usLxshro/</a></p>
  
  <pre><code>div {
      min-height: 50px;
      background: #E7E7E7;
      margin: 10px;
  }
  #wrapper {
      display: flex;
      flex-wrap: wrap;
  }
  #left-content {
      flex: 2;
      min-width: 200px;
  }
  #right-content {
      flex: 1;
      min-width: 200px;
  }
  section {
      border: 1px solid #333;
      margin: 10px;
  }
  </code></pre>