title: Sass function to convert pixels to ems
body: <p>Take this function in Sass:</p>
  
  <pre>
  @function pem($pxval, $base: 16) {
  
           @return #{$pxval / $base}em ;
  }
  </pre>
  
  <p>(source: <a href="https://gist.github.com/2237465" rel="nofollow">https://gist.github.com/2237465</a>)</p>
  
  <p><code>pem(16)</code> returns <code>1em</code> and it's ok, but <code>pem(16px)</code> returns <code>1pxem</code>.</p>
  
  <p>how can this function accept both types of input?</p>
  
  <p>thanks</p>