- From: <bugzilla@wiggum.w3.org>
- Date: Mon, 27 Sep 2004 10:29:49 +0000
- To: www-validator-cvs@w3.org
http://www.w3.org/Bugs/Public/show_bug.cgi?id=891 Summary: Basic stylesheet partitioning bug involving semicolon handling Product: CSSValidator Version: CSS Validator Platform: All OS/Version: All Status: NEW Severity: major Priority: P3 Component: CSS 2.0 AssignedTo: ot@w3.org ReportedBy: roth@visualclick.de QAContact: www-validator-cvs@w3.org The following stylesheet: @chars [.-;abc]; p {color: red} yields as effective result: p {color: red} This is wrong according to the specs, the effective style sheet should be empty. Reason: A stylesheet consists of rule-sets and at-rules. The above stylesheet partitioned according to the recognition rules for both of these looks like: ATRULE="@chars [.-;" The at-rule extends up to the first semicolon as there is no block. RULESET="abc];p {color:red}" This is because we parse until we find the end of the first block, and it cannot be an at-rule since it doesn't start with "@...". So the stylesheet consists of two rules, an ATRULE and a RULESET. Let's have a look at the rule-set: The selector is everything up to the first opening brace, so the selector is "abc];p " . This is a selector which cannot be parsed according to selector rules, hence it is invalid. If a selector is invalid, it and its corresponding declaration block must be discarded. Follows that the RULESET must be discarded. Since the ATRULE consists of an unknown ATKEYWORD, it is discarded. Likewise, due to its invalid selector, the RULESET is discarded, so effectively the resulting stylesheet is the empty stylesheet. That's however not what the validator delivers as result, so this must be considered a bug. ------- You are receiving this mail because: ------- You are the QA contact for the bug, or are watching the QA contact.
Received on Monday, 27 September 2004 10:29:49 UTC