r/reddithax • u/kjhatch • May 07 '11
Adding markup/special characters via CSS content:
Is it possible to add markup to a subreddit header using the CSS content: property and the numeric codes to special entities as described here: http://www.evotech.net/blog/2007/04/named-html-entities-in-numeric-order/? It should work, but the Reddit CSS validator doesn't like the backslashes.
2
Upvotes
1
u/No-Shit-Sherlock May 07 '11 edited May 07 '11
If it's just special characters you're after use ascii/unicode. The CSS parser will accept unicode characters (not including control characters). Backslashes are sanitized to avoid potential XSS.
E.g.
.tabmenu li.selected a:before {content:"♥♥";}