Search code examples
cssunicodeicon-fonts

Icon Fonts: What causes the uninterpreted box in the code inspector?


I'm using an icon font and everything works so far as the icons show up in the interface as they should. I'm creating the file via Sass using the .scss format.

I noticed when I inspect an element to view it's CSS properties in the code inspector, or view the style sheet via the code inspector, or just open the .css file in my text editor, it shows the Unicode character of the icon glyph as follows: .icon-alert::before { content: "" !important; }

What causes the little box with the question mark instead of what's actually written in the .scss file: \e669

How can I fix this?


Solution

  • I cannot mark this duplicate yet but there are existing posts around this topic. You have to create a function to workaround a known bug:

    Sass: unicode escape is not preserved in .css file

    https://github.com/sass/sass/issues/1395