I want to generate this CSS with a Unicode character code:
.foo::before {
content: '\4556';
}
Concatenating a single (unescaped) backslash (\) with the code (e.g. 4556).
With the main condition that I don't want to have to provide the Unicode codes already prepended with the backslash (e.g. \4556) but to generate them from an integer for example. Like in the following mixin:
@mixin make-icon ($name, $code) {
.#{$name}::before {
content: '\#{$code}';
}
}
@include make-icon('foo','4556');
However the above mixin returns this CSS:
.foo::before {
content: '\#{$code}'; }
I've tried '\\#{$code}', '\##{$code}', '/\#{$code}', '\/#{$code}', '\$code', '\\##{$code}' and none of them gives the desired result.
Even tried defining slash as a variable and interpolate it but that didn't help either.
Any idea how to solve this?