Skip to content

Instantly share code, notes, and snippets.

@dsheeler
Last active December 20, 2015 14:09
Show Gist options
  • Save dsheeler/6144562 to your computer and use it in GitHub Desktop.
Save dsheeler/6144562 to your computer and use it in GitHub Desktop.
#! /usr/bin/perl
while (<>) {
while (/([-.\d]+)(\s*)px/) {
$em = $1/16.0;
$val = $1;
$s = $2;
s/$val\s*px/${em}em/;
}
print;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment