Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Chrome Dev Tools inspect element styles not showing

Starting a couple of weeks ago....on some of our sites, but not all, when inspecting an element, the styles tab only shows the "styles box", but not the actual styles relating to css?? - Again, this is ONLY on some sites - weird

It should look like this (with styles showing on the right relating to css)

correct styles tab

BUT......instead, on SOME of our sites, this just started a couple of weeks ago looking like this....with no css showing in the styles tab:

incorrect styles tab

NOTE: it has worked for 2 years - The page looks fine and all styles are being applied to the DOM, but do NOT show up in the styles tab when inspecting element.

Any ideas??

like image 603
Jeff Avatar asked Dec 01 '14 16:12

Jeff


People also ask

How do I add styles to Chrome developer tools?

Go to element panel ( Ctrl + Shift + p and type show element panel). Scroll to the head element right click on the element and choose Edit as HTML, go to the bottom of that element ( Ctrl + End ), add your <style></style> element there add your style in that element, and hit Ctrl + Enter .

How do I know the style of inspect element?

First, hover over the element you want to copy. Then, right-click on it and choose the option “Inspect”. On the left side is the HTML DOM tree, and on the right side, the CSS styles of the selected element.

How do I force inspect element in Chrome?

Use Ctrl + Shift + C (or Cmd + Shift + C on Mac) to open the DevTools in Inspect Element mode, or toggle Inspect Element mode if the DevTools are already open.


3 Answers

I just had this same issue and to resolve it I went into Chrome Developer Tools -> Settings -> Scroll to the bottom and click "Restore defaults and reload" then it all magically came back!

I hadn't changed anything between it working and when it stopped so not sure why it broke but hopefully this helps you too.

like image 91
Andrea Black Avatar answered Oct 09 '22 16:10

Andrea Black


I just close the tab, and reopen it, and then right click > inspect element. Don't need to restore the whole dev tools to default settings. It's a waste. Try it, it works! :)

like image 39
pilau Avatar answered Oct 09 '22 16:10

pilau


I had to go to Chrome Developer Tools -> Settings -> Enable JavaScript source maps and then disable that checkbox. It has probably got do with sourcemaps and the fact that I'm building the scss to css.

like image 6
Pratik Mandrekar Avatar answered Oct 09 '22 17:10

Pratik Mandrekar