title: JavaScript: getComputedStyle inconsistent return value between browsers
body: <p>I am trying to get the value of the CSS left attribute like so...
  <code>window.getComputedStyle(document.querySelector('.test'), ':after').getPropertyValue('left');</code></p>
  
  <p>The problem is that this returns a pixel value in Chrome, but a percentage in FireFox. Is there any way to get it to force it to always return a pixel value?</p>
  
  <p>JSFiddle: <a href="https://jsfiddle.net/r8mynvL4/2/" rel="nofollow noreferrer">https://jsfiddle.net/r8mynvL4/2/</a></p>
  
  <p>HTML:</p>
  
  <p><code>&lt;div class="test"&gt;This is a test.&lt;/div&gt;</code></p>
  
  <p>CSS:</p>
  
  <pre><code>.test {
    border: 1px solid black;
    position: relative;
  }
  
  .test:after {
    content: '*';
    bottom: -10%;
    left: 95%;
    position: absolute;
  }
  </code></pre>
  
  <p>JS:</p>
  
  <pre><code>var leftValue = window.getComputedStyle(document.querySelector('.test'), ':after').getPropertyValue('left');
  
  console.log(leftValue);
  </code></pre>