Skip to content

Instantly share code, notes, and snippets.

@afknapping
Last active August 29, 2015 14:00
Show Gist options
  • Save afknapping/11188100 to your computer and use it in GitHub Desktop.
Save afknapping/11188100 to your computer and use it in GitHub Desktop.
  • in the CSS inspector in the Chrome DevTools
  • when i disable (or change) a property which is mapped to a source file
  • the link to the source file is destroyed

is there a way to respawn the link to the source file without reloading the page?

@vogtm
Copy link

vogtm commented Apr 22, 2014

Don't think it's possible out of the box right now. As far as i know chrome lose the association as soon as you change something.
(I would guess they create some kind of new "shadow css" file and change it in the background and inject it).

You could do some little hacky stuff with a js snippets. Your changes will be lost of course...

var stlyes = document.querySelectorAll('link[rel="stylesheet"]');
for(val in stlyes){
    stlyes[val].href = stlyes[val].href;
}

It will "force" to reload the original css and it seems it will also restore the source map.

@afknapping
Copy link
Author

@vogtm thx, will try this out!

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