W3C home > Mailing lists > Public > www-style@w3.org > January 2010

Proposal: parent selectors

From: Stephen Belanger <cyruzdraxs@gmail.com>
Date: Wed, 20 Jan 2010 11:11:56 -0800
Message-ID: <f4923fbe1001201111t6129b265t36eb90ea24d06130@mail.gmail.com>
To: www-style@w3.org
This has probably been suggested before, but I didn't find it in a search.

Currently we can find child elements like so;

a > img

This would return any image contained in a link--but what if you need to
select any link containing an image? For that I propose an equivalent that
runs in the opposite direction;

img < a

The css interpreter would start by finding all 'img' elements, then it would
try to move one level up and, if an 'a' element is found, would return
successful and add that element to the list of elements to apply that
particular style to.
Received on Thursday, 21 January 2010 13:47:06 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:23 GMT