Bug 62437

Summary: Adjacent sibling selector followed directly by nav selector without whitespace causes rule to be ignored
Product: WebKit Reporter: Martin Jansson <martin.jansson>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: dominicc, mihnea
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Test case for selector bug none

Description Martin Jansson 2011-06-10 00:45:33 PDT
Created attachment 96706 [details]
Test case for selector bug

When a sibling selector is followed by a selector for the nav element without any whitespace inbetween them, like so:

div+nav{color:green;}

This causes some kind of parsing error and the complete rule is ignored. However, it seems as this is only the case when the element following the plus sign is of type nav, substitute it for another element selector and the rule works. It also works if you place whitespace to the right of the plus sign, but not if you place it to the left.

All of the above works in recent versions of Firefox (4.0.1), Opera (11.10) and IE (9)

From W3C CSS2 Recommendation: "White space may appear between a combinator and the simple selectors around it."
Comment 1 Mihnea Ovidenie 2011-06-10 04:04:00 PDT
Seems like a duplicate of https://bugs.webkit.org/show_bug.cgi?id=47971.
Comment 2 Martin Jansson 2011-06-10 04:14:02 PDT
(In reply to comment #1)
> Seems like a duplicate of https://bugs.webkit.org/show_bug.cgi?id=47971.

So it seems, yes. Sorry about that. Couldn't find it when I searched for similar bugs before reporting though.
Comment 3 Dominic Cooney 2011-06-12 19:50:08 PDT

*** This bug has been marked as a duplicate of bug 47971 ***