title: Why does Firefox break my CSS grid with using a horizontal scroll area?
body: <p>I would like to work with this code:</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>* {
    margin: 0;
    padding: 0;
  }
  
  #container {
    grid-column-gap: 10px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 10px;
  }
  
  .text {
    grid-column-start: 1;
    grid-column-end: 3;
    background-color: red;
    /* overflow: hidden; → Firefox needs that. Why? */
  }
  
  .horizontal-scroll {
    background-color: green;
    overflow-x: auto;
  }
  
  .horizontal-scroll div {
    white-space: nowrap;
    font-size: 30px;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div id="container"&gt;
    &lt;div class="text"&gt;
      &lt;div&gt;Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea
        takimata sanctus est Lorem ipsum dolor sit amet.&lt;/div&gt;
      &lt;div class="horizontal-scroll"&gt;
        &lt;div&gt;This container is horizontally scrollable. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et
          ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.&lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>Unfortunately, if I use Firefox on macOS, the grid layout gets destroyed. It only works if I add <code>overflow: hidden;</code> to the <code>.text</code> class. But this is not a solution for me, because I need to place an object inside the text area that protrudes from it.</p>
  <p>How can this problem be solved?</p>