A
A
andrewnsk2017-02-25 10:07:57
Google Chrome
andrewnsk, 2017-02-25 10:07:57

Why does Chrome show in Elements> styles opposite style.less:3 and not style.css:3?

Hello!
In general, this is the situation. There is a site where styles are connected like this:

<link href="/css/style.css" media="screen" rel="stylesheet" type="text/css">

. In the css folder there was a less folder with style.less files. So the browser (and Firefox too) takes all the styles from style.css , and in the elements>styles inspector it shows that these styles are written in the less file in such and such a place. It is not clear how he even knew that there is a folder at css/less/ with styles in less. I delete the less files from the server in general, clear the cache, and the inspector still writes that in less it is in such and such a place? Is this done on purpose or is it a mistake?
Understood. Found in the settings where it turns off. Uncheck "Enable CSS source maps"

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Q
quramolt, 2017-02-26
@andrewnsk

The fact that you turned off this setting in the browser only affected the display in the inspector. The thing itself hasn't gone anywhere.
It is called sourceMaps and its appearance can be set when assembling styles. Needed for debugging and quick file navigation in DevTools. It is usually stored either at the end of the style file, or next to it. It takes up space and should be removed in the production build.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question