File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change 1+ function css_debugger ( ) {
2+ if ( ( "is_css_debugging" in window ) === false ) {
3+ is_css_debugging = false ;
4+ }
5+
6+ if ( ! is_css_debugging ) {
7+ var debug_css = document . createElement ( "style" ) ;
8+ debug_css . type = "text/css" ;
9+ debug_css . setAttribute ( "id" , "css_debugger" ) ;
10+ debug_css . textContent = `
11+ *:not(path):not(g) {
12+ color: hsla(210, 100%, 100%, 0.9) !important;
13+ background: hsla(210, 100%, 50%, 0.5) !important;
14+ outline: solid 0.25rem hsla(210, 100%, 100%, 0.5) !important;
15+ box-shadow: none !important;
16+ }
17+ ` ;
18+ document . head . appendChild ( debug_css ) ;
19+ is_css_debugging = true ;
20+ }
21+ else if ( is_css_debugging ) {
22+ var remove = document . getElementById ( "css_debugger" ) ;
23+ remove . parentNode . removeChild ( remove ) ;
24+ is_css_debugging = false ;
25+ }
26+ }
You can’t perform that action at this time.
0 commit comments