title: CSS-Grid: How to center content without shrinking the item itself?
body: <p>Using CSS-Grid, I try to put my items in the center of a grid cell, without shrinking them completely to only the content. Is this possible?</p>
  
  <p>I made a simple example on stackblitz. You can see that the items there don't fill the entire grid-cell with the background color. What is the proper way to get that working? I can remove the justify-items/align-items classes, but then the content isn't centered anymore.</p>
  
  <p><a href="https://stackblitz.com/edit/angular-8bggtq?file=app/app.component.html" rel="noreferrer">https://stackblitz.com/edit/angular-8bggtq?file=app/app.component.html</a></p>
  
  <p>Cells filled, but content not in center:</p>
  
  <p><a href="https://i.stack.imgur.com/hBrRb.png" rel="noreferrer"><img src="https://i.stack.imgur.com/hBrRb.png" alt="enter image description here"></a></p>
  
  <p>Cells not filled, but content is centered:</p>
  
  <p><a href="https://i.stack.imgur.com/xJmx6.png" rel="noreferrer"><img src="https://i.stack.imgur.com/xJmx6.png" alt="enter image description here"></a></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>.wrapper {
    display: grid;
    height: 100vh;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr 1fr;
    justify-items: center;
    align-items: center;
  }
  
  .item {
    //justify-self: stretch;
    //align-self: stretch;
  }
  
  .one {
    background: red;
  }
  
  .two {
    background: pink;
  }
  
  .three {
    background: violet;
  }
  
  .four {
    background: yellow;
  }
  
  .five {
    background: brown;
  }
  
  .six {
    background: green;
  }
  
  html,
  body {
    margin: 0;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="wrapper"&gt;
    &lt;div class="item one"&gt;1&lt;/div&gt;
    &lt;div class="item two"&gt;2&lt;/div&gt;
    &lt;div class="item three"&gt;3&lt;/div&gt;
    &lt;div class="item four"&gt;4&lt;/div&gt;
    &lt;div class="item five"&gt;5&lt;/div&gt;
    &lt;div class="item six"&gt;6&lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>