li:before{ content: "■"; } How to Encode this Special Character as a Bullit in an Email Stationery?

Sam picture Sam · Mar 15, 2011 · Viewed 184.9k times · Source

After proudly coloring my liststyle bullet without any image url or span tags, via:

ul{ list-style: none; padding:0;  margin:0;  }
li{ padding-left: 1em; text-indent: -1em;    }
li:before { content: "■"; padding-right:7px; }

Although these stylesheets work perfectly down to the rounded borders and other css3 stuff, and although the recipient of the email (for instance, Eudora OSE 1) renders all css styles correctly, just like in a browser, there is one problem: the bullets like or become converted into &#adabacadabra;

Appearing finally like so in emails:

enter image description here

How do I proceed from here?

Answer

Lea Verou picture Lea Verou · Mar 16, 2011

Never faced this problem before (not worked much on email, I avoid it like the plague) but you could try declaring the bullet with the unicode code point (different notation for CSS than for HTML): content: '\2022'. (you need to use the hex number, not the 8226 decimal one)

Then, in case you use something that picks up those characters and HTML-encodes them into entities (which won't work for CSS strings), I guess it will ignore that.