Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SASS compile fontawesome preserve notation

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; }

it is compiled to

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

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?

like image 536
Bernhard Döbler Avatar asked Aug 25 '14 14:08

Bernhard Döbler


1 Answers

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 method

Issue on SASS repo

For me, rollback to SASS 3.3.14 fix this

like image 107
vralle Avatar answered Sep 19 '22 18:09

vralle