I wanted to use use a stylesheet to add an &mdash before certain content on a web page. This should be easy with modern CSS, but span.foo:before{ content: '— '} places the text — on the web page as if the CSS engine ran the string through a sanitizer and is giving me — instead.

A Stack Overflow discussion says I need to know the character's Unicode value and use that instead. This is stupid.

Useful reference: numeric values of all named HTML escape sequences.

Page generated May. 29th, 2017 07:06 pm
Powered by Dreamwidth Studios