Last active
August 3, 2017 19:22
-
-
Save lunaroja/7d7d2a56b7c30bb4b89bd7b4c05b6a98 to your computer and use it in GitHub Desktop.
Get all elements and fine out which has a specific style value
This file contains hidden or 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
// simple way to debug which elements are loading a specific font weight so you can remove them | |
const allElements = document.querySelectorAll('body *'); | |
for (var element of allElements) { | |
let styles = window.getComputedStyle(element) | |
let weight = styles.getPropertyValue('font-weight'); | |
if (weight !== 'normal') { | |
console.log(element, weight); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment