title: Set grid items to be same height
body: <p><a href="https://i.stack.imgur.com/Gu5sm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Gu5sm.png" alt="this four-card layout" /></a> I have quite a specific issue with grid. I was trying to make with all grid items the same size. <code>stretch</code> is not an option in this case, because some of the items span across two rows. When I added <code>align-items: center</code>, that didn't solve the issue. I really didn't find anything to be of help.</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>#cards {
    padding: 0 7vw;
    margin-top: 3vh;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    align-items: center;
    justify-content: center;
  }
  
  .card:nth-child(1),
  .card:nth-child(3) {
    grid-row: span 2;
  }
  
  .card {
    display: block;
    border: solid 5px #000;
    box-shadow: 0 20px 30px -15px hsl(215, 49%, 82%);
    border-radius: 8px;
    margin: 5%;
    overflow: hidden;
    text-align: center;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div id="cards"&gt;
    &lt;div class="card"&gt;
      &lt;div class="card-content"&gt;
        &lt;h2 class="card-title"&gt;Item 1&lt;/h2&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="card"&gt;
      &lt;div class="card-content"&gt;
        &lt;h2 class="card-title"&gt;Item 2&lt;/h2&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="card"&gt;
      &lt;div class="card-content"&gt;
        &lt;h2 class="card-title"&gt;Item 3&lt;/h2&gt;
        &lt;p&gt;Hello world&lt;/p&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="card"&gt;
      &lt;div class="card-content"&gt;
        &lt;h2 class="card-title"&gt;Item 4&lt;/h2&gt;
        &lt;p&gt;I built this two line paragraph oh yes I really want it to be two lines or yes finally.&lt;/p&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>Thank you very much for your ideas.
  (I am new on Stack Overflow so feel free to give any other suggestions to help me further improve the question)</p>