-1

Wonder what content:"\e61e" is in the .icon-trash:before class' CSS. I know that they use a font to make icons but I don't know what "\e61e" is? Any explanation?

Thank you in advance.

3
  • 1
    It's a special set of unicode characters, that point to specific symbol within the font. If I had to guess, I'd say that the reason why they don't use letters from a to z, is that, if for example the font doesn't load correctly, you are left with something like this: Download ⁠ ( or it might render as empty, I'm not exactly sure ) and not something like: Download a, because the browser would render it with another font instead.
    – Joonas
    Commented Jan 27, 2016 at 7:51
  • So how they know unicode of each font? Commented Jan 27, 2016 at 8:02
  • 2
    I don't understand where this question is coming from. Why would they need to know that? When they make a icon font, they are the ones who decide what unicode character they want to map their symbols to. If they want to map a trash can to e61e, then that's what they do and no other font has anything to say about it.
    – Joonas
    Commented Jan 27, 2016 at 8:18

1 Answer 1

3

\e61e is technically this character: in UTF-8 encoding (the default encoding for CSS - this can be changed using @charset). So that's the literal answer to your question.

But as Joonas mentioned in the comments, a font can map a character like this to a symbol, in this case an icon, of their choosing. So in actuality, what you're seeing is likely different than this character - likely a trash can icon.

Since it's inside of a ::before (two colons are used because it's a pseudo element - one colon should be used for pseudo-classes), that allows it to be placed separately from the .icon-trash element itself, usually before or after the element. This is very common for icon fonts to do.

1
  • 1
    And since the character is well inside the Private User Area of Unicode, the glyph does not display anything useful if it doesn't also have the font applied to it. For any other font, you may see nothing, the regular 'not-available' Missing Character for your current font, or - my favourite - any random character that just happens to be in this place.
    – Jongware
    Commented Jan 27, 2016 at 20:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.