Last active
January 11, 2019 09:47
-
-
Save zachleat/1bad9c086af5c8a02c4a97dee2a67d4f to your computer and use it in GitHub Desktop.
Returns a unique sorted array of font-size values on a page.
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
(function() { | |
let fontSizes = new Set(); | |
document.querySelectorAll("*").forEach(function(node) { | |
fontSizes.add(window.getComputedStyle(node).getPropertyValue("font-size")); | |
}); | |
return Array.from(fontSizes).sort(); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment