title: Auto spread evenly columns with css grid
body: <p>How can i evenly spread x number of elements in columns.
  So for example if I have this code</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>div {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    grid-gap: 0.5rem;
  }
  
  span {
    background: red;
    height: 50px;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div&gt;
    &lt;span&gt;&lt;/span&gt;
    &lt;span&gt;&lt;/span&gt;
    &lt;span&gt;&lt;/span&gt;
    &lt;span&gt;&lt;/span&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I want it to fit evenly. So it should never show 3 items on first row, and 1 item on the second row. Instead it should show 2 items on the first and 2 on the second. As long as it can spread it evenly on every row it should do that.</p>
  
  <p>I made a snippet that ALMOST makes it. The problem is when the screen is really small it shows 3 on the first and 1 on the second. Please make note that now I only have 4 items, but it should work dynamically with any number of items.</p>