SASS编译字体很棒的保存符号 [英] SASS compile fontawesome preserve notation

查看:71
本文介绍了SASS编译字体很棒的保存符号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我用sass 3.4.1将fontawesome.scss编译为一个css文件时

When I compile fontawesome.scss to a css file with sass 3.4.1

$fa-var-music: "\f001"; 
.#{$fa-css-prefix}-music:before { content: $fa-var-music; }

它被编译为

.fa-music:before {
  content: "";
}

由于我主要在项目中使用Win1252编码,所以我想知道在CSS文件中保留"\ f001"的方式是什么.为什么SASS会重写?

As I'm mainly using Win1252 encoding in my project I'm wondering what's the way to preserve "\f001" in the css file. Why does SASS rewrite?

推荐答案

从Sass 3.4.0中提取更改日志: Sass现在遵循CSS语法第3级规范来确定样式表的编码.此外,它现在仅发出UTF-8 CSS,而不是尝试匹配源编码.

Extract from Sass 3.4.0 changelog: Sass now follows the CSS Syntax Level 3 specification for determining a stylesheet’s encoding. In addition, it now only emits UTF-8 CSS rather than trying to match the source encoding.

现在无法使用旧的方法

问题关于SASS回购

对我来说,回滚到SASS 3.3.14可以解决此问题

For me, rollback to SASS 3.3.14 fix this

这篇关于SASS编译字体很棒的保存符号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆