title: Transform scale keeps the original space around the scaled element
body: <p>I have two nested divs. The <code>inner one</code> is <code>transform: scale(0.5)</code>.</p>
  <p>Both are <code>display: inline-block;</code>.</p>
  <p>What I need to happen is the <code>outer div</code> fits it's width to the width of the inner one. That's what I supposed to happen but not. What occur is that the outer div «thinks» the inner div has it's original size.</p>
  <p>The outer div fits it's width to the inner's width only if the inner div is <code>transform: scale(1)</code> but not using an scale factor less than 1, for example: <code>0.5</code> (see example).</p>
  <p>I need some way to achieve this by CSS in an elegant way.</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>.red {
    background-color: #f00;
  }
  
  .green {
    background-color: #0f0;
  }
  
  .box_1,
  .box_2 {
    display: inline-block;
  }
  
  .box_1 {
    width: 300px;
    height: 300px;
    transform: scale(0.5);
    transform-origin: left top;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="box_2 green"&gt;
    &lt;div class="box_1 red"&gt;Hello World&lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>Any idea on how to solve this?</p>