- From: Arron Eicholz <Arron.Eicholz@microsoft.com>
- Date: Sun, 22 Feb 2009 11:31:13 -0800
- To: Robert Stam <robert@tallcomponents.com>, "public-css-testsuite@w3.org" <public-css-testsuite@w3.org>
- Message-ID: <66D5CB5D6AB0694592FAF5487C50368B29B5446F20@NA-EXMSG-C111.redmond.corp.microsoft>
I think you are getting your error handling mixed up with @keywords. This is not going into @keyword error handling because of the space right after the @ symbol. Why you ask? The @ symbol is not followed by an IDENT as required by all @ keywords. And specifically @charset, @import, @page or @media, thus the @ symbol in this case is just an IDENT under the simple_selector rules in Appendix G and it’s an invalid IDENT for that matter. In this case the parsing ends up like this: @ = invalid IDENT for an element_name import = valid IDENT, for an element_name “../../../Support/at-rule-red.css”; = is also attempting to be an IDENT for an element_name which it is also invalid. Next the div = which is a valid IDENT for an element_name Then we move onto parsing the { } of the div. Even assuming that the @ and “…“; were valid element_names you couldn’t match an element on the page with that selector. This is one of those real tricky cases that tricks your brain into thinking that this is a case that should follow the Invalid at-keyword rules in section 4.2 but it really is a 4.1.7 test case. So the case is a correct case just a little complicated to determine where the rule is supposed to be handled from a spec perspective. -- Thanks, Arron Eicholz From: public-css-testsuite-request@w3.org [mailto:public-css-testsuite-request@w3.org] On Behalf Of Robert Stam Sent: Thursday, January 29, 2009 2:15 AM To: public-css-testsuite@w3.org Subject: Explaination request: MS test (IE8, RC1) -- H4\at-rule-001.htm Hi, Find below the test document. Please notice that the @ and import identifier are separated by a space. I expected that the invalid at-keyword would end at the ; after at-rule-red.css"; The specification says: “User agents must ignore<http://www.w3.org/TR/CSS21/syndata.html#ignore> an invalid at-keyword together with everything following it, up to and including the next semicolon (;) or block ({...}), whichever comes first.” This results in a red “Filler Text”, can somebody please give me an explanation why the div rule should be ignored as well? Thanks in advance. Best Regards, Robert Stam TallComponents <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>CSS Test: Parser error handling with invalid at-rules: @ invalid selector</title> <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors" /> <meta name="flags" content="invalid" /> <meta name="assert" content="At-Rules start with an at-keyword (@ followed immediately by an identifier)." /> <style type="text/css"> @ import "../../../Support/at-rule-red.css"; div { color: red; } * { color: green; } </style> </head> <body> <p>Test passes if the "Filler Text" below is green.</p> <div>Filler Text</div> </body> </html>
Received on Sunday, 22 February 2009 19:32:07 UTC