Skip to content

Instantly share code, notes, and snippets.

@mvrilo
Created July 5, 2012 22:20
Show Gist options
  • Save mvrilo/3056839 to your computer and use it in GitHub Desktop.
Save mvrilo/3056839 to your computer and use it in GitHub Desktop.
px to em
var i = 6,
list = {};
console.log('base: 16px');
console.log('-----------------');
while (i < 50) {
var px = i + 'px',
em = String(i/16) + 'em';
list[px] = em;
i++;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment