W3C home > Mailing lists > Public > www-style@w3.org > May 2004

Re: [CSS3-Selectors] Question on :empty pseudo-class

From: Bert Bos <bert@w3.org>
Date: Sat, 22 May 2004 10:27:26 -0400
Message-ID: <40AF634E.6030701@w3.org>
To: www-style@w3.org

Boris Zbarsky wrote:

> I was looking at the definition of the :empty pseudo-class [1] and it 
> seems to be rather underdefined to me... 
[...]
>          but it seems to 
> me that the spec should be interoperably implementable based on the 
> information contained in the spec.  My apologies if this is already on 
> the issues list, of course.

Yes, it's underspecified and it's indeed on the WG's issues list. At some point 
(hopefully soon) we will publish an updated spec.

I believe these examples cover all cases:

Empty:

     <foo/>
     <foo></foo>
     <foo><!-- empty --></foo>
     <foo><?pi?></foo>
     <foo><![CDATA[]]</foo>

Not empty:

     <foo>text</foo>
     <foo> </foo>                   -- assuming XML, SGML may be different
     <foo><bar/></foo>

These cases are also in the Selectors test suite (tests 148-153).



Bert
-- 
   Bert Bos                                ( W 3 C ) http://www.w3.org/
   http://www.w3.org/people/bos                               W3C/ERCIM
   bert@w3.org                             2004 Rt des Lucioles / BP 93
   +33 4 93 65 76 92               06902 Sophia Antipolis Cedex, France
Received on Saturday, 22 May 2004 10:28:04 GMT

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