Skip to content

Instantly share code, notes, and snippets.

@lkurzyniec
Created March 31, 2020 16:34
Show Gist options
  • Save lkurzyniec/4f0bfcaca7cedb374e8795ba00d7c3fd to your computer and use it in GitHub Desktop.
Save lkurzyniec/4f0bfcaca7cedb374e8795ba00d7c3fd to your computer and use it in GitHub Desktop.
CSS Layout Debbuger
[].forEach.call(document.querySelectorAll("*"),function(a){a.style.outline="1px solid #"+(~~(Math.random()*(1<<24))).toString(16)})
// or
[].forEach.call($$("*"),function(a){a.style.outline="1px solid #"+(~~(Math.random()*(1<<24))).toString(16)})
// or
for(i=0;A=$$("*")[i++];)A.style.outline="solid hsl("+(A+A).length*9+",99%,50%)1px"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment