title: Can I emulate flex-grow and flex-shrink with CSS Grid layout?
body: <p>Take a look at this behavior of <code>footer__column</code> selector made on flexboxes (you should look at big screen sizes at least of 1156px of wide) </p>
  
  <p>CodePen: <a href="https://codepen.io/anon/pen/ZwwGMB?editors=1100" rel="nofollow noreferrer">https://codepen.io/anon/pen/ZwwGMB?editors=1100</a>
  or
  <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>.footer {
    position: relative;
    z-index: 1;
    margin-top: 60px;
  }
  .footer__inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
  }
  .footer__row {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
  }
  .footer__column {
    display: flex;
    flex-wrap: wrap;
    flex-shrink: 0;
    flex-grow: 1;
    align-content: flex-start;
    background-color: #F5F7FC;
    width: 0;
    min-width: 300px;
    padding: 10px;
    margin-right: 60px;
    margin-bottom: 40px;
  }
  .footer__side {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
  }
  .footer__text {
    padding-top: 5px;
    padding-bottom: 5px;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="footer__floor"&gt;
      &lt;div class="footer__inner"&gt;
          &lt;div class="footer__row"&gt;
              &lt;div class="footer__column"&gt;
                &lt;p&gt;Lorem ipsum dolor sit amet consectetur adipisicing elit. Ut sint ratione doloremque laboriosam laborum! Id sunt ut corrupti repellat vel autem aut velit enim, harum, eveniet, aliquam reprehenderit ea odio.&lt;/p&gt;
                
              &lt;/div&gt;
              &lt;div class="footer__column"&gt;
                &lt;p&gt;Lorem ipsum dolor sit amet consectetur adipisicing elit. Ut sint ratione doloremque laboriosam laborum! Id sunt ut corrupti repellat vel autem aut velit enim, harum, eveniet, aliquam reprehenderit ea odio.&lt;/p&gt;
              &lt;/div&gt;
              &lt;div class="footer__column"&gt;
                &lt;p&gt;Lorem ipsum dolor sit amet consectetur adipisicing elit. Ut sint ratione doloremque laboriosam laborum! Id sunt ut corrupti repellat vel autem aut velit enim, harum, eveniet, aliquam reprehenderit ea odio.&lt;/p&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>When the last column does not fit into the row it takes all available space
  at the next row below. </p>
  
  <p>It becomes available because of <code>flex-grow:1</code>, <code>min-width:300px;</code> and <code>flex-shrink:0</code>.</p>
  
  <p>I tried to find exactly the same solution on CSS-grid with no success.
  I tried to use the <code>autofill</code> property, but the column always takes the next cell.</p>
  
  <p>CodePen: <a href="https://codepen.io/anon/pen/pGGJBb?editors=1100" rel="nofollow noreferrer">https://codepen.io/anon/pen/pGGJBb?editors=1100</a> or</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>.footer {
    position: relative;
    z-index: 1;
    margin-top: 60px;
  }
  .footer__inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
  }
  .footer__grid {
    display: grid;
    grid-gap: 60px;
    grid-template-columns: repeat(auto-fill, minmax(300px, 2fr));
    width: 100%;
  }
  .footer__column {
    display: flex;
    flex-wrap: wrap;
    flex-shrink: 0;
    flex-grow: 1;
    align-content: flex-start;
    background-color: #F5F7FC;
    width: 0;
    min-width: 300px;
    padding: 10px;
    margin-bottom: 40px;
  }
  .footer__side {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
  }
  .footer__text {
    padding-top: 5px;
    padding-bottom: 5px;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="footer__floor"&gt;
    &lt;div class="footer__inner"&gt;
      &lt;div class="footer__grid"&gt;
        &lt;div class="footer__column"&gt;
          &lt;p&gt;Lorem ipsum dolor sit amet consectetur adipisicing elit. Ut sint ratione doloremque laboriosam laborum! Id sunt ut corrupti repellat vel autem aut velit enim, harum, eveniet, aliquam reprehenderit ea odio.&lt;/p&gt;
  
        &lt;/div&gt;
        &lt;div class="footer__column"&gt;
          &lt;p&gt;Lorem ipsum dolor sit amet consectetur adipisicing elit. Ut sint ratione doloremque laboriosam laborum! Id sunt ut corrupti repellat vel autem aut velit enim, harum, eveniet, aliquam reprehenderit ea odio.&lt;/p&gt;
        &lt;/div&gt;
        &lt;div class="footer__column"&gt;
          &lt;p&gt;Lorem ipsum dolor sit amet consectetur adipisicing elit. Ut sint ratione doloremque laboriosam laborum! Id sunt ut corrupti repellat vel autem aut velit enim, harum, eveniet, aliquam reprehenderit ea odio.&lt;/p&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I know it could be possible with media query and <code>grid-template: span 2</code> property. But the thing is I do not want to write any additional media queries at all. I want to get the same automatic behavior as I did with flexboxes above.</p>
  
  <p>So the question is: is it possible? If yes, could you provide the solution?</p>