W3C home > Mailing lists > Public > www-style@w3.org > February 2010

[CSS2.1] Behavior for invalid \-newline in the middle of an identifier

From: Zack Weinberg <zweinberg@mozilla.com>
Date: Tue, 23 Feb 2010 13:37:07 -0800
To: W3C Emailing list for WWW Style <www-style@w3.org>
Message-ID: <20100223133707.63e1a359@trurl>
This is a follow-up to Issue 85:
http://wiki.csswg.org/spec/css2.1#issue-85

The spec forbids \-newline to occur in the middle of an identifier, but
does not say how the parser should recover from this error.

The simplest fix, I think, is to add this text right before the "For
example:" in the third paragraph of the bullet point in
http://www.w3.org/TR/CSS2/syndata.html#characters that talks about
backslashes:

  If a backslash outside a string is immediately followed by a linefeed,
  carriage return, form feed, or the end of the style sheet, it
  generates a DELIM token as if it were a normal punctuation character.

I would also recommend that the phrase "Except within CSS comments" be
removed and replaced by a new second sentence of the first paragraph of
this bullet point:

  Backslashes have no special meaning within comments.

This whole area could stand to be reorganized but I shall refrain.

zw
Received on Tuesday, 23 February 2010 21:37:41 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:24 GMT