W3C home > Mailing lists > Public > www-style@w3.org > March 1999

Re: The \ escape character in the "content" property.

From: L. David Baron <dbaron@fas.harvard.edu>
Date: Thu, 25 Mar 1999 09:52:32 -0500 (EST)
Message-Id: <199903251452.JAA01272@login6.fas.harvard.edu>
To: nlesbats@etu.utc.fr, www-style@w3.org
On Thu, 25 Mar 1999 15:29:36 +0100 (MET), Nicolas Lesbats
(nlesbats@etu.utc.fr) wrote:
> 
> 	E:after { content: "A word\AAnother word" }
> 
> How will the UA undertand the \ escape character ? Like \A or like \AA ?
> Is this example CSS-conformant ? Is an white space required after any
> escape sequence ? And before ?

These rules are defined in section 4.1.3 [1] of CSS2 (and more formally
in 4.1.1 [2]).

In this case, it is interpreted as \AA.  A unicode character escape
will suck up up to six hexidecimal digits following the backslash.
There is also an optional whitespace character following the character
escape which will not be treated as part of the string.  My test for
browser treatment of these escapes shows NGLayout supports one simple
form, and neither IE, Opera, nor NN4 support them at all [3].

Ways to do what I think you want are (in theory):

"A word\A Another word"
"A word\0A Another word"
"A word\00A Another word"
etc...
"A word\00000A Another word"
"A word\00000AAnother word"
"A word\
Another word"  /* by just escaping an LF character */

David

[1] http://www.w3.org/TR/REC-CSS2/syndata.html#q4
[2] http://www.w3.org/TR/REC-CSS2/syndata.html#tokenization
[3] http://www.fas.harvard.edu/~dbaron/csstest/parsing3
Received on Thursday, 25 March 1999 09:52:35 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:53:58 GMT