Skip to content

Instantly share code, notes, and snippets.

@andymasteroffish
Created August 16, 2016 18:38
Show Gist options
  • Save andymasteroffish/1a72db2de1469628f3d4f1edd600e648 to your computer and use it in GitHub Desktop.
Save andymasteroffish/1a72db2de1469628f3d4f1edd600e648 to your computer and use it in GitHub Desktop.
var all = document.getElementsByTagName("*");
for (var i=0, max=all.length; i < max; i++) {
console.log("doing "+i+" of "+all.length);
var rect = all[i].getBoundingClientRect();
all[i].style.fontSize = (rect.top * 0.04)+"px";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment