title: :after and :before elements are invisible under transparent border
body: <p>I'm tryng to animate :after anf :before elements which intended to be positioned under div border. Snippet below demonstrates working case, but if I uncomment <code>border: 2px solid transparent;</code>, pseudo-elements become invisible. 
  I tried to change box-sizing - no matter.</p>
  
  <p>The question is: Why transparent border behaves as opaque?</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>.ex {
      position: relative;
      box-sizing: border-box;
      width: 100px;
      height: 40px;
      line-height: 2em;
      text-align: center;
      background-color: lightgreen;
  /*    border: 2px solid transparent; */
      margin: 30px;
  }
  .ex::after, .ex::before {
      content: " ";
      z-index: -1;
      display: block;
      position: absolute;
      width: 0;
      height: 0;
      background: red;
      transition: all .2s ease;
  }
  .ex::before {
      top: -2px;
      left: -2px;
  }
  .ex::after {
      bottom: -2px;
      right: -2px;
  }
  .ex:hover::after, .ex:hover::before {
      width: calc(100% + 4px);
      height: calc(100% + 4px);
  
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="ex"&gt;hover me&lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>