title: Flex child with multiple lines width problem
body: <p>I have a <code>div</code> with a <code>display:flex</code> and a fixed width.
  It has two children: the first one containing text, and the second one something like a &quot;badge&quot; (just a div with fixed width and height).</p>
  <p>I want <strong>the second child to be located right next to the text of the first child</strong>, but the problem is that the first child takes width more than it contents (example in the snippet below)</p>
  <p>I've tried to add <code>flex-basis: 0</code> to the first child, but then each word starts with a new line, even if there is enough place to display the whole text in one line.</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>.parent {
    width: 150px;
    background: lightblue;
    display: flex;
    align-items: center;
  }
  
  .first-child {
    outline: 1px solid red;
  }
  
  .first-child span {
    outline: 1px solid white;
  }
  
  
  .second-child {
    outline: 1px solid blue;
    width: 20px;
    height: 10px;
    flex-shrink: 0;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="parent"&gt;
    &lt;div class="first-child"&gt;
      &lt;span&gt;Loooooooong teeeeeext&lt;/span&gt;
    &lt;/div&gt;
    &lt;div class="second-child"&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;br /&gt;&lt;br /&gt;
  &lt;div class="parent"&gt;
    &lt;div class="first-child"&gt;
      &lt;span&gt;Short text&lt;/span&gt;
    &lt;/div&gt;
    &lt;div class="second-child"&gt;
    &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>