Bug 62437 - Adjacent sibling selector followed directly by nav selector without whitespace causes rule to be ignored
Summary: Adjacent sibling selector followed directly by nav selector without whitespac...
Status: RESOLVED DUPLICATE of bug 47971
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-10 00:45 PDT by Martin Jansson
Modified: 2011-06-12 19:50 PDT (History)
2 users (show)

See Also:


Attachments
Test case for selector bug (702 bytes, text/html)
2011-06-10 00:45 PDT, Martin Jansson
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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 ***