V
V
Vechkov Alexander2019-04-21 23:22:51
Sass
Vechkov Alexander, 2019-04-21 23:22:51

Why does vs code add "_" when I try to follow the scss import link?

5cbcd1018a1e5911584268.png
When I try to go to the file test1.scss, I get that the file does not exist and at the same time indicates it with an underscore, like this - "_test1.scss"? like on the screen. At the same time, the file "smart-grid.scss", located in the same folder, opens quietly.
In addition, this file is compiled and its contents appear in the compiled css file.
What is the reason and how to fix it?
PS: I checked the file paths and the names too - they are written correctly.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladislav, 2019-04-21
@vlad00777

I think because it is customary for non-compiled files with styles to start from "_".
If you are importing a file that will be compiled later, you will end up with duplicate styles 2 times (1 time in a separate file and 1 time in the file you are importing into).
I think you did not explicitly indicate the name and extension of the file here, which is why it screams (you have .scss above).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question