title: Why doesn’t height: 0 hide my padded <div>, even with box-sizing: border-box?
body: <p>I’ve got a <code>&lt;div&gt;</code> with padding. I‘ve set it to <code>height: 0</code>, and given it <code>overflow: hidden</code> and <code>box-sizing: border-box</code>.</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>div {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    height: 0;
    overflow: hidden;
    padding: 40px;
    background: red;
    color: white;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div&gt;Hello!&lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>As I understand, this should make the <code>&lt;div&gt;</code> disappear.</p>
  <p>However, it’s still visible (in Chrome 31 and Firefox 25 on my Mac). The <code>height</code> declaration doesn’t appear to be applying to the padding, despite the <code>box-sizing</code> declaration.</p>
  <p>Is this expected behaviour? If so, why? <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/box-sizing" rel="noreferrer">The MDN page on <code>box-sizing</code></a> doesn’t seem to mention this issue.</p>
  <p>Nor, as far as I can tell, does <a href="http://www.w3.org/TR/css3-ui/#box-sizing0" rel="noreferrer">the spec</a> — it reads to me like both width and height should include padding when <code>box-sizing: border-box</code> (or indeed <code>padding-box</code>) are set.</p>