title: How do I set text-overflow to ellipsis in CSS grid layout?
body: <p>I have a grid layout like the one in <code>header</code> below. There is a text in the div whose width is <code>1fr</code>. I want the text inside that div to be truncated when it is too long. Adding <code>text-overflow</code> as <code>ellpsis</code> is not working. Any idea how to do it?</p>
  
  <p>It has to be grid and there is no way I can change that.</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%;
    width: 100%;
    overflow: hidden;
  }
  
  body {
    display: flex;
  }
  
  .container {
    display: flex;
    flex-direction: column;
    flex: 1;
  }
  
  content {
    flex: 1;
    background-color: red;
  }
  
  header {
    background-color: limegreen;
    display: grid;
    grid-template-columns: 0fr 1fr 0fr;
  }
  
  header div {
    border: 1px solid orange;
  }
  
  .long {
    text-overflow: ellipsis;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="container"&gt;
    &lt;header&gt;
      &lt;div&gt;Left&lt;/div&gt;
      &lt;div class="long"&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.&lt;/div&gt;
      &lt;div&gt;Right&lt;/div&gt;
    &lt;/header&gt;
    &lt;content&gt;
    &lt;/content&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>