This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
When I tried to validate the CSS of a sample page of mine, the validator complained that it could not parse certain items in the external print-only CSS file, even though that CSS file validated correctly by itself. In particular, if you try to validate http://www.zap.org.au/~john/web/sinorcaish/index.html, you will find that it complains about http://www.zap.org.au/~john/web/sinorcaish/sinorcaish-print.css. The complaint is: Line: 0 Parse Error - : none !important; } .notprinted Line: 0 Parse Error - : 0 0 0.5em 0; } #main .highlight After much puzzling over this problem, I found that REMOVING the comments from inside the definitions made the Parse Error go away. In other words, the following CSS (in that sinorcaish-print.css file) did not validate: .hidden { /* Used for content that should be displayed */ /* by non-stylesheet-aware browsers */ display: none !important; } .notprinted { /* Used for content that should not be */ /* printed to paper */ display: none !important; } (and similarly for "#main h1" followed by "#main .highlight"), but the following version (ie, with comments removed) DID validate: .hidden { display: none !important; } .notprinted { display: none !important; } Not all such comments cause problems! Removing the comments around "#main h1" / "#main .highlight" suddenly caused other definitions to be incorrectly parsed. In other words, I cannot see the pattern behind it! I can only suggest that comments that immediately follow a "{" are not handled correctly.
The relevant page URL has been changed to: http://www.zap.org.au/documents/styles/sinorcaish/example/index.html The relevant CSS is: http://www.zap.org.au/documents/styles/sinorcaish/example/sinorcaish-print.css
Fixed, see http://qa-dev.w3.org:8001/css-validator/