title: Why auto-fit or auto-fill not working properly with minmax?
body: <p>It doesn't work properly when I add auto-fit or auto-fill instead of a number.</p>
  
  <pre><code> grid-template-columns: repeat(auto-fit, minmax(max-content, max-content));
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/UNgn6.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/UNgn6.jpg" alt="enter image description here"></a></p>
  
  <p>But it works properly when I add number instead of max-content.</p>
  
  <pre><code>grid-template-columns: repeat(auto-fit, minmax(50px, max-content));
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/s1fhg.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/s1fhg.jpg" alt="enter image description here"></a></p>
  
  <p>But I want the size of the grid to be the same(be fit) as the size of the content. Like this:</p>
  
  <pre><code>grid-template-columns: repeat(30, minmax(max-content, max-content));
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/NLMht.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/NLMht.jpg" alt="enter image description here"></a></p>
  
  <p>(using auto-fit or auto-fill). How can I do that?</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>* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  ul {
   display: grid;
   grid-template-columns: repeat(auto-fit, minmax(max-content, max-content));
   grid-gap: 10px;
  }
  
  li {
    list-style: none;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;body&gt;
      &lt;nav&gt;
        &lt;ul&gt;
          &lt;li&gt;lorem ipsum&lt;/li&gt;
          &lt;li&gt;dolor sit&lt;/li&gt;
          &lt;li&gt;amet&lt;/li&gt;
          &lt;li&gt;word&lt;/li&gt;
          &lt;li&gt;word&lt;/li&gt;
          &lt;li&gt;word&lt;/li&gt;
          &lt;li&gt;word&lt;/li&gt;
          &lt;li&gt;word&lt;/li&gt;
          &lt;li&gt;word&lt;/li&gt;
          &lt;li&gt;word&lt;/li&gt;
          &lt;li&gt;word&lt;/li&gt;
          &lt;li&gt;word&lt;/li&gt;
          &lt;li&gt;word&lt;/li&gt;
          &lt;li&gt;word&lt;/li&gt;
          &lt;li&gt;word&lt;/li&gt;
          &lt;li&gt;word&lt;/li&gt;
          &lt;li&gt;word&lt;/li&gt;
          &lt;li&gt;word&lt;/li&gt;
          &lt;li&gt;word&lt;/li&gt;
          &lt;li&gt;word&lt;/li&gt;
          &lt;li&gt;word&lt;/li&gt;
          &lt;li&gt;word&lt;/li&gt;
          &lt;li&gt;word&lt;/li&gt;
          &lt;li&gt;word&lt;/li&gt;
          &lt;li&gt;word&lt;/li&gt;
          &lt;li&gt;word&lt;/li&gt;
          &lt;li&gt;word&lt;/li&gt;
          &lt;li&gt;word&lt;/li&gt;
          &lt;li&gt;word&lt;/li&gt;
          &lt;li&gt;word&lt;/li&gt;
          &lt;li&gt;word&lt;/li&gt;
          &lt;li&gt;word&lt;/li&gt;
          &lt;li&gt;word&lt;/li&gt;
          &lt;li&gt;word&lt;/li&gt;
          &lt;li&gt;word&lt;/li&gt;
          &lt;li&gt;word&lt;/li&gt;
          &lt;li&gt;word&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/nav&gt;
    &lt;/body&gt;</code></pre>
  </div>
  </div>
  </p>