W3C home > Mailing lists > Public > www-style@w3.org > July 2006

Re: [CSS 3 Selectors] :empty -- Definition Error

From: Stewart Brodie <stewart.brodie@antplc.com>
Date: Tue, 11 Jul 2006 17:43:49 +0100
To: www-style@w3.org
Message-ID: <d6f76f99b828acf818c93323122f6ace2f7438c2@localhost>

Sophie Dennis <sophie@cayenne.co.uk> wrote:

> 
> >On Monday 2006-07-10 14:06 -0700, Garrett Smith wrote:
> > > http://www.w3.org/TR/css3-selectors/
> > >
> > > E:empty  - an E element that has no children (including text nodes)
> > >
> > > If you really want to include text nodes, the definition must be
> > > changed.
> > >
> >
> >No, the "including" refers to "children", not "element".
> >
> >It could be clearer, but that change would make it worse, not better.
> 
> Perhaps:
> 
> E:empty  - an E element that has no child elements or text nodes

"child elements" suffers the same problem.  The easiest way to clarify it,
if it's really necessary, could be to replace "children" with "child nodes"
or use a DOM method to describe it:

E:empty - an E element that has no child nodes

E:empty - an E element that has no child nodes. i.e. E.firstChild == null

Once text nodes are mentioned explicitly like that, it makes me start to
wonder whether comment nodes cause E:empty to not match too (and
cdata-section nodes, comment nodes, processing-instruction et al for that
matter)


-- 
Stewart Brodie
Software Engineer
ANT Software Limited
Received on Tuesday, 11 July 2006 20:30:13 GMT

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