Sass: unicode escape code not saved in .css file

I am using unicode escape in my .sass file and I want to save it, but sass creates a weird character in the output. How to solve this?

I am using Mac and Sass version 3.4.13.

mborkent@MacBook-Pro-van-Michiel /tmp $ cat new.sass .icon-ok &:before content: "\e601" mborkent@MacBook-Pro-van-Michiel /tmp $ sass new.sass new.css mborkent@MacBook-Pro-van-Michiel /tmp $ cat new.css @charset "UTF-8"; .icon-ok:before { content: ""; } /*# sourceMappingURL=new.css.map */ 
+5
source share
1 answer

This is a known issue . There is a workaround that can be found in the @tjbenton post on github:

 @charset "UTF-8" @function unicode($str) @return unquote("\"")+unquote(str-insert($str, "\\", 1))+unquote("\"") .icon-ok &:before content: unicode("e601") 

Conclusion:

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

All Articles