Created
September 20, 2017 15:03
-
-
Save kribblo/a08a5eea7cc90734d2782197d4742357 to your computer and use it in GitHub Desktop.
Quick one-off hack in Perl to scale some CSS properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
perl -pi -e 's/(width|height|margin-?\w*|padding-?\w*|font-size): ([\d+\.])(vw|vh|%|px)/"$1: ".sprintf("%.2f", $2*(1\/0.85)).$3/e' file.css |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment