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

Re: [CSS21] Backing up in tokenizer (issue 129)

From: Peter Moulder <peter.moulder@monash.edu>
Date: Thu, 19 Aug 2010 07:28:42 +1000
To: W3C style mailing list <www-style@w3.org>
Message-id: <20100818212842.GA2759@bowman.infotech.monash.edu.au>
I suggest making this a separate issue, but we also need to know what to do
when encountering one of these BAD tokens (or CDO or CDC) when parsing.
Section 4.2 is currently unclear on this: for example, given

  img { float: left CDO/CDC/BAD_* ...

the text is not clear as to whether we accept float:left as a valid declaration
or not: on one hand "float" ':' "left" is valid as a complete declaration,
while on the other hand we haven't seen a semicolon or close-brace that would
usually terminate a complete declaration.  (If you like, consider instead the
case that the "float: left" part were changed to "font: bold".)

It's not in general clear how to "find [the illegal part's] ... end" when
CDO/CDC/BAD_* are involved.  Does that CDO/CDC/BAD_* mark the end of a
declaration, does it mark the end of a ruleset, bracketed expression etc. ?

What tokens, if any, after the CDO/CDC/BAD* should also be skipped?

The answer may well be that the "Unexpected end of string" rules apply to all
of the CDO/CDC/BAD* tokens, though if so then this should be stated explicitly.

Also, I don't understand the "or rule" part of "drop the construct (declaration or rule)",
or more generally what the rule is for how much to drop in a given circumstance.

I'd also tend to suggest avoiding the term "rule" in CSS2.1, if section 4.1.7
seems to claim that "rule" can mean "rule set", while other text uses it as
if it meant "declaration".

Received on Wednesday, 18 August 2010 21:29:16 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:13:49 UTC