- From: <bugzilla@wiggum.w3.org>
- Date: Thu, 18 Nov 2004 05:58:44 +0000
- To: www-validator-cvs@w3.org
http://www.w3.org/Bugs/Public/show_bug.cgi?id=948 Summary: Cannot parse some CSS comments when CSS file included in HTML Product: CSSValidator Version: CSS Validator Platform: Other URL: http://www.zap.org.au/~john/web/sinorcaish/index.html OS/Version: other Status: NEW Severity: normal Priority: P2 Component: XHTML1.0 AssignedTo: ot@w3.org ReportedBy: J.Zaitseff@zap.org.au QAContact: www-validator-cvs@w3.org 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. ------- You are receiving this mail because: ------- You are the QA contact for the bug, or are watching the QA contact.
Received on Thursday, 18 November 2004 05:58:45 UTC