Skip to content

Instantly share code, notes, and snippets.

@LewisAlderman
Last active May 12, 2018 15:43
Show Gist options
  • Select an option

  • Save LewisAlderman/2910caad936a0816cda94e19aad82873 to your computer and use it in GitHub Desktop.

Select an option

Save LewisAlderman/2910caad936a0816cda94e19aad82873 to your computer and use it in GitHub Desktop.
Simple CSS Debugger
if (!("is_debugging" in window)) { is_debugging = false; var debug_el = document.createElement("style"); debug_el.append(document.createTextNode(`*:not(path):not(g) { color: hsla(210, 100%, 100%, 0.9) !important; background: hsla(210, 100%, 50%, 0.5) !important; outline: solid 0.15rem hsla(210, 100%, 100%, 0.5) !important; box-shadow: none !important; }`)); } function enable_debugger() { if (!is_debugging) { document.head.appendChild(debug_el); is_debugging = true; } } function disable_debugger() { if (is_debugging) { document.head.removeChild(debug_el); is_debugging = false; } } !is_debugging ? enable_debugger() : disable_debugger();
*:not(path):not(g) {
color: hsla(210, 100%, 100%, 0.9) !important;
background: hsla(210, 100%, 50%, 0.5) !important;
outline: solid 0.125rem hsla(210, 100%, 100%, 0.5) !important;
box-shadow: none !important;
}

MIT License | zaydek.github.com/debug.css

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment