title: How is "grid-template-rows: auto auto 1fr auto" interpreted?
body: <p>Recently, I created a layout using <a href="https://www.w3.org/TR/css-grid-1/" rel="noreferrer">CSS grid</a>. While this works well, I'm confused by how it works. Specifically, I'm confused about the line <code>grid-template-rows: auto auto 1fr auto;</code>. </p>
  
  <p>What ended up happening here is that the header and footer sized according to the content, which makes sense since they spanned the width of the page. The article itself sized according to its content. But, the "title" and "nav" were split such that the title sized according to content and nav took the rest of the space.</p>
  
  <p>Had I used <code>grid-template-rows: auto auto auto auto;</code> instead, the title and nav would've shared equal spacing, which was not what I wanted.</p>
  
  <p>How was the <code>auto auto 1fr auto</code> interpreted so that it gave me the sizing such that title took the minimum required space and nav took the rest? How does "fr" and "auto" interact in this scenario?</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>main {
      display: grid;
      grid-template-columns: 10rem auto;
      grid-template-rows: auto auto 1fr auto;
      grid-template-areas: "header header" "title article" "nav article" "footer footer";
  }
      
  header {
    grid-area: header;
    background: lightblue;
  }
  
  div {
    grid-area: title;
    background: orange;
  }
  
  nav {
    grid-area: nav;
    background: pink;
  }
  
  article {
    grid-area: article;
    background: yellow;
  }
    
  footer {
    grid-area: footer;
    background: lightblue;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;main&gt;
  &lt;header&gt;This is the header&lt;/header&gt;
  &lt;div&gt;This is the title&lt;/div&gt;
  &lt;nav&gt;This is the nav&lt;/nav&gt;
  &lt;article&gt;
    This is the article. This is the article. This is the article. This is the article.
    This is the article. This is the article. This is the article. This is the article.
    This is the article. This is the article. This is the article. This is the article.
    This is the article. This is the article. This is the article. This is the article.
    This is the article. This is the article. This is the article. This is the article.
    This is the article. This is the article. This is the article. This is the article.
  &lt;/article&gt;
  &lt;footer&gt;This is the footer&lt;/footer&gt;
  &lt;/main&gt;</code></pre>
  </div>
  </div>
  </p>