<!DOCTYPE html>
<script>
  if (window.testRunner)
    testRunner.dumpAsText();
</script>
<style>
  #grid {
    display: grid;
    grid: 100px / 100px;
  }
  #item {
    padding: 10px;
    margin: 50px 0px;
    min-height: max-content;
  }
</style>
<p>crbug.com/697317 - height &gt;= 0 in LayoutBox.cpp</p>
<p>This test has PASSED if it does not CRASH.</p>
<div id="grid">
  <div id="item"></a>
</div>
