title: Center a grid container vertically and horizontally
body: <p>Surprisingly, I can't find anything about this online. Maybe I've missed something. How do you horizontally and vertically center your entire main wrapper with CSS Grid, and obviously, maintain responsiveness?</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;
    grid-template-columns: minmax(100vw, 1fr);
    grid-template-rows: minmax(100vh, 1fr);
    align-items: center;
    justify-content: center;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="wrapper"&gt;
    &lt;div class="centerthis"&gt;loremloremlorem&lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Using the CSS above, the <code>div</code> is centered vertically, but not horizontally.</p>
  
  <p>The following CSS centers the div horizontally, but not vertically:</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>.maingrid {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    align-items: center;
    justify-content: center;
  }
  
  .centerthis {
    align-self: center;
    justify-self: center;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="maingrid"&gt;
    &lt;div class="centerthis"&gt;loremloremlorem&lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>