title: Flex child shrinks when applying "align-self: center"
body: <p>I'd like to horizontally center align a flex child inside a flex container.</p>
  
  <p>However, when the child gets <code>align-self: center</code> it shrinks to width = 0.</p>
  
  <p>Note that both the container and the child have <code>max-width</code>.</p>
  
  <p>How would you solve this?</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>.container {
    display: flex;
    flex-direction: column;
    max-width: 400px;
    outline: 2px solid red;
  }
  
  .child {
    display: flex;
    flex-direction: column;
    max-width: 200px;
    height: 50px;
    background-color: #ccc;
    /* This causing the child to shrink to width = 0 */
    /* align-self: center; */
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="container"&gt;
    &lt;div class="child"&gt;
    &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>