Created
August 25, 2022 17:56
-
-
Save tarciozemel/1bb7e39fe03c44b3a82f66b1f62693f8 to your computer and use it in GitHub Desktop.
Log too-wide elements
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
const docWidth = document.documentElement.offsetWidth | |
document.querySelectorAll('*').forEach(el => { | |
if (el.offsetWidth > docWidth) { | |
console.log(el) | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment