Sass has a Chinese problem.
I saw a lot of excellent resources in this garden, and I also wanted to write something. I suddenly thought of a Chinese garbled solution when I was writing sass. I will summarize all of them. (The following test steps are all completed by yourself! No reprinted content. If any error occurs, I hope you can correct it)
Simple Description: it is much easier for sass to write css styles. This makes it easier for us to write css syntaxes that do not have the logic processing capability. sass has a simple logic processing capability.
The installation of sass is not detailed here. The process is roughly like this: Install ruby --- install sass -- configure sass in webstrom
I. modify it in the sass configuration file
First, this sass configuration file is generally stored in the ruby installation directory.
After finding my ruby installation directory, find the file we need to configure in this folder:
If the version you installed is the same as me, It is roughly the following path,
Ruby23-x64 \ lib \ ruby \ gems \ 2.3.0 \ gems \ sass-3.4.22 \ lib \ sass
There is a configuration file under sass:
Engine. rb file;
Open ------
Add the following code here: Encoding. default_external = Encoding. find ('utf-8 ');
---- Save is a success. Please try it!
OK !;
2: Add @ charset "UTF-8 ";
You need to use Chinese to add this method. The first method is to automatically add sass for you. The principles are consistent;
In your sass file
(Do not forget to add the css generated by sass, because each addition will be invalid, because the content of the compiled css will only change as the content of the sass file changes)
The results of this method are consistent.
Question about Chinese path:
Last question about the Chinese path: I have tried this problem, but there will still be some minor problems in the end. Do not use the Chinese path.
Finally, I will summarize this content. It is easy to write. If there are any deficiencies or errors, I hope you can correct them!