W3C home > Mailing lists > Public > www-style@w3.org > November 2007

Re: Question about the Adjacent sibling combinator

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Fri, 23 Nov 2007 13:26:36 +0100
To: Barry Rader <brader@boldinternet.com>
Cc: "www-style@w3.org" <www-style@w3.org>
Message-ID: <qihdk3hpjbjjhonioa20or6hkhq3k3toj0@hive.bjoern.hoehrmann.de>

* Barry Rader wrote:
>I have been trying to figure out the expected behaviour of this combinator.
>
>h3 + ul{}
>
>Would this mean that the style defined here would affect the ul, the h3 
>or some kind of combination of both.

This is defined in <http://www.w3.org/TR/css3-selectors/>. At the moment
the subject of a selector is always the one at the end, so this would
select only 'ul' elements.

>If it is the behaviour to affect the ul only is there any way to have a 
>reverse combinator that will affect the h3?

Currently there is no such feature. You can search the list archive for
some of the proposals that have been made to support this. Old drafts of
CSS3 Selectors has a :subject pseudo-class. None of the methods is in
any current draft.
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 
Received on Friday, 23 November 2007 12:53:28 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:56 GMT