Sass has a Chinese problem.

Source: Internet
Author: User

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!

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.