Testcase: http://www.gtalbot.org/BrowserBugsSection/MSIE7Bugs/HyphenFollowedByADigitInIdentifiers.html Bug entry: http://www.gtalbot.org/BrowserBugsSection/MSIE7Bugs/#bug59 CSS 2.1, Section 4.1.3 Characters and case (identifiers) says: "in CSS, identifiers (including element names, classes, and IDs in selectors) can contain only the characters [a-z0-9] and ISO 10646 characters U+00A1 and higher, plus the hyphen (-) and the underscore (_); they cannot start with a digit, or a hyphen followed by a digit." http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier CSS 2.1, Section 4.1.1 tokenization and CSS 2.1, G.2 Lexical scanner both gives ident -?{nmstart}{nmchar}* nmstart [_a-z]|{nonascii}|{escape} In the testcase, the 2nd <p> is red, not green. Relevant code: .two {color: green; background: white;} #-2bar, .two {color: red; background-color: white;} <p class="two">This should be green.</p> Since an id identifier can not start with an hyphen followed by a digit, the 2nd rule should be rejected and only the first rule should apply. Regards, Gérard
Created attachment 27194 [details] introduce needed CSS tokenizer states for proper contextual #{ident|hexcolor} parsing introduce needed CSS tokenizer states for proper contextual #{ident|hexcolor} parsing
SVN commit 856458 by ggarand: introduce needed CSS tokenizer states for proper contextual #{ident|hexcolor} parsing BUG: 170068 M +2 -0 cssparser.cpp M +2 -0 maketokenizer M +405 -404 parser.cpp M +82 -80 parser.h M +2 -1 parser.y M +630 -560 tokenizer.cpp M +15 -9 tokenizer.flex
Konqueror 4.1.2 passes the 2nd test Marking as VERIFIED