Lets demonstrate an example with simple HTML code like this:
<div data-icon="\25B6">Title</div>
I would like this element to have an prefix icon set by it's data attribute (data-icon) so I set CSS file like this:
div:before {
content: attr(data-icon);
}
My desired output of this example would look like this:
▶Title
Instead of desired output all I can get is this:
\25B6Title
So my question is: what am I doing wrong / what am I missing?
JSFiddle example: http://jsfiddle.net/Lqgr9zv6/