This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 1072 - CSS3: Error in parsing selectors with comments
Summary: CSS3: Error in parsing selectors with comments
Alias: None
Product: CSSValidator
Classification: Unclassified
Component: Other (show other bugs)
Version: CSS Validator
Hardware: All All
: P2 major
Target Milestone: ---
Assignee: Olivier Thereaux
QA Contact: qa-dev tracking
Depends on:
Reported: 2005-02-07 11:23 UTC by Christian Roth
Modified: 2006-04-25 09:52 UTC (History)
0 users

See Also:


Description Christian Roth 2005-02-07 11:23:55 UTC
The following stylesheet gives an error when validating using CSS3 profile:

a/*test*/b {color: red}

It is however valid according to CSS3 selectors grammar (which is normative) and should be interpreted 
like CSS2's

a b { color: red}

Note that the CSS3 selectors grammar does not require an explicit whitespace as combinator, it can 
also be empty. This is a change compared with parsing selectors in CSS2+CSS21 and therefore should 
be handled properly in the respective CSS level profile.
Comment 1 Bert Bos 2006-04-25 09:52:04 UTC
This was fixed in the latest draft of Selectors ( The text (both in sections 4 and 8.1) has always said that the "combinator" of a descendant selector must contain white space. The grammar incorrectly allowed empty combinators in the versions until Nov 2001.

The example "a/*test*/b" is not a valid selector in CSS3, because two identifiers cannot follow each other without white space or some punctuation between them. There is no difference between CSS level 3 and lower levels in that respect.