I use webfont for icons. Icon characters are mapped to an additional private use area of ββUnicode-A and B.
Everything works fine if I pass characters in CSS using data- * attributes:
<div class="icon" data-icon="󰁚"></div>
And then:
.icon::before {
font-family: IconFont;
content: attr(data-icon)
}
But if I try to embed the escaped character directly in CSS ...
.icon::before {
font-family: IconFont;
content: '\0F005A ';
}
It appears as a question mark for the absence of a character.
But if I try another special character ...
.icon::before {
font-family: IconFont;
content: '\F8FF ';
}
It works great!
I cannot find anything in the specification that says this is impossible ... It just doesn't work.
Can anyone figure this out?
source
share