title: flexbox div goes off screen on small screen
body: <p>Code first:</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>html {
    display:flex;
    width:100%;
    height:100%;
  }
  
  body {
   display:flex;
    flex:1;
  }
  
  .container {
    display:flex;
    flex:1;
    overflow-y:auto;
    flex-direction:column;
    justify-content:center;
    align-items:center;
  }
  
  .block1 {
    justify-content:center;
    background-color:green;
    display:flex;
    width:300px;
    min-height:150px;
  }
  
  .block2 {
    background-color:blue;
    display:flex;
    min-height:300px;
      width:500px;
  
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="container"&gt;
  &lt;div class="block1"&gt;
    &lt;img src="https://tse2.mm.bing.net/th?id=OIP.M252f960f4a4f32c22914d8d87623f066o0&amp;pid=15.1"&gt;
  &lt;/div&gt;
  &lt;div class="block2"&gt;&lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I have two blocks in a container. I want them centered on the screen.
  The issue is when the screen height is small,  I have a scrollbar that appear but the first block have a part that go offscreen (is invisible)</p>
  
  <p>To reproduce, decrease the height of the jsfiddle preview window. You will understand what I mean by going off screen.</p>
  
  <p>The expected behavior is to let the scroll bar appear and keep the div visible.</p>
  
  <p>I tried by setting flex-shrink to 0 on every element but it isn't working...</p>