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

only-child selector

From: fantasai <fantasai.lists@inkedblade.net>
Date: Fri, 09 Mar 2007 10:47:19 +1300
Message-ID: <45F08467.7000605@inkedblade.net>
To: www-style@w3.org

The :only-child selector applies to elements that are the only element
child of their parent. They can have text siblings, just not element

I can't think of any use cases for this, but, I can think of several
for a selector that selects an element that is the only child of it's
parent and /does not/ have any text siblings aside from whitespace.

I want to be able to select

   things like this

but not

things like <code>this</code>

Can't think of any good names for it (:only-child-content?), but I'd
like to see this in some future version of CSS.

Received on Thursday, 8 March 2007 21:47:48 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:28 UTC