SASS编译字体很棒的保存符号

sass CSS

2020-04-03

当我使用Sass 3.4.1将fontawesome.scss编译为CSS文件时

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

它被编译为

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

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

第4028篇《SASS编译字体很棒的保存符号》来自Winter(https://github.com/aiyld/aiyld.github.io)的站点

1个回答
GO 2020.04.03

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.

Now no way for use old metod

Issue on SASS repo

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

问题类别

JavaScript Ckeditor Python Webpack TypeScript Vue.js React.js ExpressJS KoaJS CSS Node.js HTML Django 单元测试 PHP Asp.net jQuery Bootstrap IOS Android