Skip to content

Instantly share code, notes, and snippets.

@gseilheimer
Forked from zaydek-old/bookmark.min.js
Created May 4, 2018 16:58
Show Gist options
  • Save gseilheimer/22c4394df1691e6dc226515a27394e1f to your computer and use it in GitHub Desktop.
Save gseilheimer/22c4394df1691e6dc226515a27394e1f to your computer and use it in GitHub Desktop.
A simple CSS debugger. Learn more here: https://medium.freecodecamp.org/88529aa5a6a3. To use, bookmark "Debug CSS" at https://zaydek.github.io/debug.css
/* debug.css | MIT License | zaydek.github.com/debug.css */ 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.25rem 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();
/*! debug.css | MIT License | zaydek.github.com/debug.css */
*:not(path):not(g) {
color: hsla(210, 100%, 100%, 0.9) !important;
background: hsla(210, 100%, 50%, 0.5) !important;
outline: solid 0.25rem hsla(210, 100%, 100%, 0.5) !important;
box-shadow: none !important;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment