Why sometimes Chrome Dev Tool shows scss file instead of compiled css file?
Asked Answered
A

2

5

enter image description here As the above image shows, while inspecting some elements, the Chrome Dev Tool shows it is related with a .scss file, when I click the file, it is empty. I test it with Safari on macOS, it also shows this scss file but when clicked, it correctly shows the content of this scss file. It seems the dev tool is somehow bugged here.

Anyway, my question is, on what condition would Chrome Dev Tools(and the like) shows scss file instead of compiled css file?

Anchoveta answered 12/11, 2019 at 18:43 Comment(1)
those scss files has a source map files generated while compiling to css, you can find them right beside the actual scss or the css filesSpinal
H
12

You do not have to show the scss file please uncheck Enable CSS source maps checkbox

  1. Step-1:- Please open chrome Developer tools
  2. Step-2:- Press F1 key
  3. Step-3:- uncheck Enable CSS source maps checkbox

enter image description here

Hanrahan answered 23/11, 2019 at 13:52 Comment(0)
B
3

That is because a typography.css.map file is present in the same directory as the typography.css file. Chrome recognizes this map file and displays typography.scss instead of typography.css. This also works for mozilla too.

Borglum answered 28/3, 2020 at 10:49 Comment(1)
I happens without that. Please see the accepted answer.Bandbox

© 2022 - 2024 — McMap. All rights reserved.