Missed double quotes in style.scss

35 views
Skip to first unread message

dmitry...@gmail.com

unread,
Mar 2, 2018, 9:01:41 AM3/2/18
to IcoMoon
Hi, I just detected that when exporting icons into scss, the output file "variables.scss" does not have a double quotes per icon variable anymore, that's affect our project. Quotes added later via sass function "unicode" defined on style.scss

variables.scss:
//before
$my-icon-arrow-up: "\e9bf";

//after
$my-icon-arrow-up: \e9bf;


style.scss:
//before
.my-icon-arrow-up {
&:before {
content: $my-icon-arrow-up;
}
}

//after
@function unicode($str) {
@return unquote("\"") + $str + unquote("\"");
}
.my-icon-arrow-up {
&:before {
content: unicode($my-icon-arrow-up);
}
}

I didn't catch when this changes was introduced.
Could you please explain is there are any solution to return double quotes back as it was before via preferences or it's the only new format for scss output?

Keyamoon

unread,
Mar 2, 2018, 9:54:28 AM3/2/18
to IcoMoon
I made this change so that the CSS output would only contain ascii letters, which would make using utf-8 encoding unnecessary. You can use the `unicode` mixin to get the character code with double quotes, just like the example above.

dmitry...@gmail.com

unread,
Mar 2, 2018, 9:58:54 AM3/2/18
to IcoMoon
Thanks for explanations and fast feedback, got it.
Reply all
Reply to author
Forward
0 new messages