title: CSS Grid and Absolute Positioning on Safari
body: <p>I have a problem with a css grid layout.</p>
  
  <p>The grid container is absolutely positioned and the grid-template-rows contains an 1fr to allow one row to take all the free space.</p>
  
  <p>This displays correctly on all current browsers except the latest Safari installed with macOS 10.13.2</p>
  
  <p>The issue seems to be caused by it not calculating the freespace if the height is not explicitly set. </p>
  
  <p>Am I missing something or is there a workaround?</p>
  
  <p><a href="https://jsfiddle.net/w5xho67w/49/" rel="noreferrer">jsfiddle example</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>html,
  body {
    height: 100%;
    margin: 0;
    padding: 0;
  }
  
  .wrapper {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    display: grid;
    grid-template-rows: 1fr 150px;
    grid-template-columns: 1fr 150px;
    grid-template-areas: "a b" "c d";
  }
  
  .wrapper&gt;div {
    outline: solid 1px #aaa;
    padding: 10px;
  }
  
  .game {
    grid-area: a;
  }
  
  .player {
    grid-area: b;
  }
  
  .rules {
    grid-area: d;
  }
  
  .controls {
    grid-area: c;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="wrapper"&gt;
    &lt;div class="game"&gt;game&lt;/div&gt;
    &lt;div class="player"&gt;player&lt;/div&gt;
    &lt;div class="rules"&gt;rules&lt;/div&gt;
    &lt;div class="controls"&gt;controls&lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>