2015-05-24 4 views
5

Ich benutze eine Unicode-Escape in meiner .sass-Datei, und ich möchte es beibehalten, aber Sass erstellt ein seltsames Zeichen in der Ausgabe. Wie löst man das?Sass: Unicode-Escape ist in .css-Datei nicht erhalten

Ich benutze einen Mac und Sass Version 3.4.13.

[email protected] /tmp $ cat new.sass 
.icon-ok 
    &:before 
    content: "\e601" 
[email protected] /tmp $ sass new.sass new.css 
[email protected] /tmp $ cat new.css 
@charset "UTF-8"; 
.icon-ok:before { 
    content: ""; } 

/*# sourceMappingURL=new.css.map */ 
+0

Auch bezogen werden: http://stackoverflow.com/questions/25677306/sass-3 -4-1-escape-a-270e-in-270e-welches-bricht-ein-Schriftart-Symbol – cimmanon

Antwort

6

Es ist known issue. Es gibt eine Abhilfe, die in der @tjbenton Post auf Github zu finden ist:

@charset "UTF-8" 

@function unicode($str) 
    @return unquote("\"")+unquote(str-insert($str, "\\", 1))+unquote("\"") 

.icon-ok 
    &:before 
    content: unicode("e601") 

Ausgang:

.icon-ok:before { 
    content: "\e601"; 
}