Skip to content

Instantly share code, notes, and snippets.

@ddevdan
ddevdan / find-elem-with-breakout-width.js
Created May 3, 2022 12:46 — forked from joshwcomeau/find-elem-with-breakout-width.js
Paste this in your browser console to search for HTML elements which extend past the window's width and create a horizontal scrollbar.
function findBreakoutElem(rootElem = document.body) {
function checkElemWidth(elem) {
if (elem.clientWidth > window.outerWidth) {
console.log("The following element has a larger width than the window's outer width");
console.log(elem);
console.log('<-------------------------------------------------------------------->');
} else if (elem.scrollWidth > window.outerWidth) {
console.log("The following element has a larger width than the window's scroll width");
console.log(elem);
console.log('<-------------------------------------------------------------------->');
@ddevdan
ddevdan / HackaPET.md
Created August 1, 2019 15:19 — forked from Erick2280/HackaPET.md
Dicas e material para o HackaPET,

Hackathons

Acessibilidade no desenvolvimento de software

Esse conteúdo é mais sobre como pensar em acessibilidade na criação de apps e sites no geral