Skip to content

Instantly share code, notes, and snippets.

@lunaroja
Last active August 3, 2017 19:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lunaroja/7d7d2a56b7c30bb4b89bd7b4c05b6a98 to your computer and use it in GitHub Desktop.
Save lunaroja/7d7d2a56b7c30bb4b89bd7b4c05b6a98 to your computer and use it in GitHub Desktop.
Get all elements and fine out which has a specific style value
// 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