text-overflow ellipsis on flex child not working : <p>I have container with <code>flex</code>. I want the middle child will take the entire space so I set it <code>flex: 1</code>. So far so good.</p>

<p>The next level is that the middle child has 2 child so I want to set it flex too (If you lost me, just skip to the snippet) and the first child I set ellipsis styles. Now, the ellipsis stops working.</p>

<p>If you will click on the button, you will see that everything good with short text;</p>

<p>Any ideas?</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-js lang-js prettyprint-override"><code>function toggle() {
  var el = document.querySelector('.el');
  el.textContent = el.textContent === 'short' ? 'long long long text' : 'short';
}</code></pre>
<pre class="snippet-code-css lang-css prettyprint-override"><code>.wrapper {
  display: flex;
  width: 200px;
  align-content: stretch;
  padding: 5px;
  min-width: 0;
  border: 1px solid
}

.wrapper .child2 {
  flex-grow: 1;
}

.flex {
  display: flex;
  min-width: 0;
}

.el {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.child1 {
  background: red;
}

.child2 {
  background: blue;
}

.child3 {
  background: green;
}

.wrapper&gt;* {
  padding: 5px;
}</code></pre>
<pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="wrapper"&gt;
  &lt;div class="child1"&gt;child1&lt;/div&gt;
  &lt;div class="child2"&gt;
    &lt;div class="flex"&gt;
      &lt;div class="el"&gt;long long long text&lt;/div&gt;
      &lt;div&gt;a&lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="child3"&gt;child3&lt;/div&gt;
&lt;/div&gt;

&lt;button onclick="toggle()"&gt;Toggle ellipsis text&lt;/button&gt;</code></pre>
</div>
</div>
</p>
