Comments in selectors: CSS1 versus later

In CSS1, comments in selectors act like spaces because they
reset the tokenizing context to 0
(<http://www.w3.org/TR/1999/REC-CSS1-19990111#appendix-b>). Thus
the selector

{type/* */#ID}

yields the tokens (IDENT, HASH) and parses as two instances of
simple_selector. Contrast this with the selector

{type#ID}

which yields the tokens (IDENT, HASH_AFTER_IDENT) and parses as
one instance of simple_selector.

According to the prose in Section 1.7, "Comments"
(<http://www.w3.org/TR/REC-CSS1#comments>), this behavior is not
an error:

    "For a CSS1 parser, a comment is equivalent to whitespace."

However, this behavior differs from that of CSS2 and later, in
which a comment may appear inside a simple selector ("sequence
of simple selectors" in CSS3) without changing the meaning.

The Working Group should add to CSS2.1 to mention this
difference.

Is this issue worth flagging for change in some possible later
revision of CSS1?

-- 
Etan Wexler.
Dead Kennedys meet Destiny's Child? Let's party!

Received on Friday, 14 February 2003 22:52:12 UTC