CSS:after encoding characters in content
To use encoded Unicode characters in content
you need to provide either the characters themselves (as you do), or their UTF-8 escape sequences instead of HTML entities:
a.up:after { content: " \2193"; }
a.down:after { content: " \2191"; }
Why do you want to encode those characters anyway? Remember, you're writing CSS, not HTML. Your code:
a.up:after{content: " ↓";}
a.down:after{content: " ↑";}
is perfectly valid, as long as you save the file with UTF-8 encoding and send the appropriate header:
Content-Type: text/css; charset=utf-8
Encoding characters is only used in HTML so that there is no ambiguity between content and tags. Thus, you would encode<
as <
so that the browser doesn't think it's the beginning of a tag. Stuff like ↓
are just commodities for people who don't know how to use utf-8 (or can't, for whatever reason) :).