Bug Report.

I believe this to be a bug in the CSS validator (for CSS level 2):

Submit the following stylesheet:
.a,.1{color:red}

Expected results:
No stylesheet found.

Actual results:
Error returned for the .1, but .a { color : red; } is accepted.

Why this is wrong:
From the CSS level 2 specification (specifically
http://www.w3.org/TR/REC-CSS2/syndata.html#q8):

----------------
CSS2 gives a special meaning to the comma (,) in selectors. However, since
it is not known if the comma may acquire other meanings in future versions
of CSS, the whole statement should be ignored if there is an error anywhere
in the selector, even though the rest of the selector may look reasonable in
CSS2.
Illegal example(s):
For example, since the "&" is not a valid token in a CSS2 selector, a CSS2
user agent must ignore the whole second line, and not set the color of H3 to
red:
H1, H2 {color: green }
H3, H4 & H5 {color: red }
H6 {color: black }
----------------

I apologize if this bug has already been reported; I did not see it in the
list. Thank you for your time and consideration.

Sincerely,
Ran Ari-Gur

Received on Sunday, 8 December 2002 23:06:16 UTC