Re: CSS comment syntax

Bjoern Hoehrmann wrote:

> * "Robin Berjon" <robin@knowscape.com> wrote:
> | >Which of these lines are comments and what is their content?
> | >
> | >/**/
> | >/** */
> | >\/* */
> | >/* \*/ */
> | >
> | >I'd say 1, 2 and 4 are comments, with the content '', '* ' and ' \*/ ',
> | >correct?
> |
> | Isn't 4's content actually '*/', the \ being removed because it is only
> | there to protect what follows it ?
>
> syndata.html reads: "[...] Style sheet preprocessors must not remove these
> backslashes from a style sheet since that would change the style sheet's
> meaning."

The key word being *preprocessors* not style sheet *parsers*, the parser must
remove the escape, it is not a character in and of itself but a modifier of
the following character. A preprocessor must leave the backslash intact so
that the parser can see it later so it knows to cancel the special meaning of
the following character...

See: http://www.w3.org/TR/REC-CSS2/syndata.html#escaped-characters

"Any character (except a hexadecimal digit) can be escaped with a backslash to

remove its special meaning. For example, "\"" is a string consisting of one
double quote."

>
>
> So I didn't do this here.
> --
> XHTML 1.0 - german translation/deutsche Übersetzung:
>      http://www.websitedev.de/xhtml/xhtml1/

Received on Saturday, 2 December 2000 16:15:32 UTC