[thelist] CSS pseudo element :before

liorean liorean at gmail.com
Thu Dec 9 14:34:29 CST 2004


On Thu, 9 Dec 2004 12:27:35 +0100, Antonio - poste.it
<antonio.angelo at poste.it> wrote:
> Two questions:
> 1. Do I really need to specify entities or I can use the character itself (e.g. >)?

For UTF-8 or UTF-16 savvy clients, you may enter the character
directly if you send the file in that encoding. If you use any other
encoding, you should use the escaping mechanism.

> 2. How can I specify a numeric entity? (e.g. &#169; or another hard-to-type character)?

The CSS spec defines a syntax /\\[0-9a-fA-F]{1,6}/, which may or may
not be followed by a single whitespace or newline.

In other words, '\' followed by at least one and at most six
hexadecimal digits. Any single newline or single whitespace that
follows the escape is considered a part of it, thus 't\73 \00065t'
will be interpreted as 'test', not 'te st'. Note that since /[a-f]/
may be part of the escape, you must place a space in front of any of
those if it follows directly after the escape, whereas any other
character (except for whitespaces and newlines, obviously) may be
entered directly after the escape.
-- 
David "liorean" Andersson
<uri:http://liorean.web-graphics.com/>


More information about the thelist mailing list