I am using a unicode escape in my .sass file and I want to preserve it, but sass is creating a weird character in the output. How to solve this?
I'm using a 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 */
It is known issue. There is a workaround, which 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")
Output:
.icon-ok:before {
content: "\e601";
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With