Is the following
.a + .b + .c
a valid selector for an element of class c that directly follows two elements of class a and b respectively? It seems to work in Chrome 16. Is it clear from the standard, that it should work?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Works fine for me and is standard, as far as I know. (Have never seen anything to the contrary)
Example: http://jsfiddle.net/6ykxB/
If it were just utilizing the last adjacent selector, this would still work
.z + .b + .cbut it doesn’t
Example2: http://jsfiddle.net/6ykxB/1/
A reference on SitePoint mentions multiple adjacent sibling selectors, a further confirmation that they are standard:
http://reference.sitepoint.com/css/adjacentsiblingselector
However, there is a warning for elements with
:hoverand multiple selectors: