title: How to move around the GRID's children that have dynamic size
body: <p>I'm building a responsive webpage. Im using <code>Flexbox</code> and <code>Grid</code> for most of my layouts. Mostly, everything works ok, but I've run into some complex layouts and i'm wondering if using <code>Grid</code> is the way to go.</p>
  
  <p>Basically, my design starts with a simple layout.</p>
  
  <pre><code>&lt;div class="grid"&gt;
      &lt;div class="g-cover"&gt;COVER&lt;/div&gt;
      &lt;div class="g-heading"&gt;HEADING&lt;/div&gt;
      &lt;div class="g-details"&gt;DETAILS&lt;/div&gt;
      &lt;div class="g-media"&gt;MEDIA&lt;/div&gt;
      &lt;div class="g-comment"&gt;COMMENT&lt;/div&gt;
  &lt;/div&gt;
  
  
  .grid {
      display: grid;
      grid-template-columns: auto;
      grid-template-rows: auto;
      grid-gap: 40px;
  }
  </code></pre>
  
  <p>That looks like this</p>
  
  <p><a href="https://i.stack.imgur.com/G8r2T.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/G8r2T.jpg" alt="enter image description here"></a></p>
  
  <p>So far so good. The problem is when I try to expand the page and move the grid's children around. I can't get it to work the way I want it... and im wondering if the <code>Grid</code> is the right tool for this.</p>
  
  <p>For example, when I expand the page I want the <code>Grid</code> to look like this:</p>
  
  <p><a href="https://i.stack.imgur.com/7QuJe.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7QuJe.jpg" alt="enter image description here"></a></p>
  
  <p>The grid's children height are dynamic, so sometimes it looks like this (notice the media is shorter):</p>
  
  <p><a href="https://i.stack.imgur.com/KXGwh.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KXGwh.jpg" alt="enter image description here"></a></p>
  
  <p>Searching here, I've came up with this model that doesn't work...</p>
  
  <pre><code>@media screen and (min-width: 768px) {
  
      .g-cover {
          grid-area: cover;
      }
  
      .g-heading {
          grid-area: heading;
      }
  
      .g-details {
          grid-area: details;
      }
  
      .g-media {
          grid-area: media;
      }
  
      .g-comment {
          grid-area: comment;
      }
  
      .grid {
          grid-template-columns: 40% auto;
          grid-template-rows: auto;
          grid-template-areas:
          "cover heading"
          "cover media"
          "details media"
          ". comment"
      }
  }
  </code></pre>
  
  <p>Am I going the wrong path? Is <code>Grid</code> the correct tool for what I'm trying to achieve. I just need guidance from the experts coz I've spent days trying to figure this one out.</p>