简体   繁体   English

SCSS 文件观察器编码问题

[英]SCSS file-watcher encoding issue

I have been using a SASS/SCSS file-watcher in my ide for quite a while now and for the past few days I have been having issues with the encoding.我在 ide 中使用 SASS/SCSS 文件观察器已经有一段时间了,在过去的几天里,我一直遇到编码问题。 At the moment I work with another developer on a software and we're using a git system to handle the files.目前,我与另一位开发人员一起开发软件,我们正在使用 git 系统来处理文件。 A few days ago I pulled an update from git and sice then there seems to be something wrong with the encoding from the scss to css files.几天前,我从 git 和 sice 中提取了一个更新,然后从 scss 到 css 文件的编码似乎有问题。 For example: When the file-watcher compiles the font-awesome scss files to css it changes the output from:例如:当文件观察器将 font-awesome scss 文件编译为 css 时,它会将 output 更改为:

.fa-angle-left:before {
    content: "\f104";
}

to:至:

.fa-angle-left:before {
    content: "";
}

I have tried to change the encoding of the files but it doesn't seem to do anything.我试图更改文件的编码,但它似乎没有做任何事情。 Does anybody have an idea on how I can fix this issue?有人知道我如何解决这个问题吗? Thanks谢谢

Try changing the content of the class to something like this:尝试将 class 的内容更改为如下内容:

.fa-angle-left:before {
    content: " #{'\f104'}";
}

and try adding this to the top of your scss file:并尝试将其添加到您的 scss 文件的顶部:

@charset "utf-8";

Source: GitHub Issue来源: GitHub 问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM