title: Image tag in flexbox causes overflow
body: <p>I'm working with tailwind and try to create a quartered flexbox inside a container with fixed height.</p>
  <p>The flexbox should not overflow that fixed height. It works just fine until I add an <code>img</code>-element. Then the flexbox grows above the fixed height of the container. This just happens with <code>img</code>-elements. Even if I set their height to 1% it causes the flexbox to overflow. If i limit the width of the image element itself, I can counteract the problem. But I want the image to be limited to 100% width/100% height of the parent element (and scaled with preserving aspect ratio).</p>
  <p>I've also read that image elements and flexbox have some strange behavior. The recommended solution was to put the image element inside another div container. But that either causes problems with vector images or leads to the same problem with overflow of the flexbox.</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>.icon {
    height: 100%;
    width: 25%;
  }
  
  .icon &gt; img {
    height: 25%;
    width: auto;
  }
  
  .line-red {
    outline: 1px solid red;
  }
  .line-green {
    outline: 1px solid green;
  }
  
  .line-blue {
    outline: 1px solid blue;
  }
  
  .line-orange {
    outline: 1px solid orange;
  }
  
  .line-purple {
    outline: 1px solid purple;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://cdn.tailwindcss.com"&gt;&lt;/script&gt;
  &lt;div class="h-screen"&gt; &lt;!-- Demonstration purpose only --&gt;
    &lt;div class="h-3/4 w-3/4 overflow-auto line-red" style="min-height: 75%;"&gt; &lt;!-- Demonstration purpose only --&gt;
      &lt;div class="flex flex-col align-center h-full"&gt;
        &lt;div class="text-center"&gt;Title&lt;/div&gt;
        &lt;div class="flex flex-wrap self-center h-full w-3/4"&gt;
            
          &lt;div class="w-full h-1/4 line-green"&gt;
            &lt;div class="icon"&gt;
              Box 1
            &lt;/div&gt;
          &lt;/div&gt;    
            
          &lt;div class="w-full h-1/4 line-blue"&gt;
            &lt;div class="icon"&gt;
              Box 2
            &lt;/div&gt;
          &lt;/div&gt; 
            
          &lt;div class="w-full h-1/4 line-orange"&gt;
            &lt;div class="icon"&gt;
               &lt;img src="https://svgur.com/i/kDQ.svg" /&gt;
            &lt;/div&gt;
          &lt;/div&gt; 
            
          &lt;div class="w-full h-1/4 line-purple"&gt;
            &lt;div class="icon"&gt;
              Box 4
            &lt;/div&gt;
          &lt;/div&gt; 
      
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>