title: With/Height layout misaligned after CSS rotate on inline-block elements
body: <p>After rotating a group of rectangular <code>inline-block</code> elements, the new width and height are not respected in the layout flow. This means that they are left overlapping one-another. Is there any way around this with CSS?</p>
  
  <p>In the example below, note how the left margins are covered and there is a large white space above second line of blocks.</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>p {
    width: 20px;
    height: 80px;
    background: red;
    margin-left: 10px;
    display: inline-block;
    border: #FFF solid 1px;
  }
  .r {
    transform: rotate(90deg);
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>Before:
  &lt;br/&gt;
  &lt;p&gt;&lt;/p&gt;
  &lt;p&gt;&lt;/p&gt;
  &lt;p&gt;&lt;/p&gt;
  &lt;p&gt;&lt;/p&gt;
  &lt;p&gt;&lt;/p&gt;
  &lt;hr/&gt;After:
  &lt;br/&gt;
  &lt;p class='r'&gt;&lt;/p&gt;
  &lt;p class='r'&gt;&lt;/p&gt;
  &lt;p class='r'&gt;&lt;/p&gt;
  &lt;p class='r'&gt;&lt;/p&gt;
  &lt;p class='r'&gt;&lt;/p&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Live example: <a href="http://codepen.io/anon/pen/vKqjoR?editors=1100#0" rel="nofollow noreferrer">http://codepen.io/anon/pen/vKqjoR?editors=1100#0</a></p>
  
  <p><a href="https://i.stack.imgur.com/0uhZo.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0uhZo.gif" alt="enter image description here"></a></p>