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

Re: Proposal for new `any of these elements' selector type

From: L. David Baron <dbaron@fas.harvard.edu>
Date: Wed, 2 Jan 2002 17:14:17 -0500 (EST)
To: <www-style@w3.org>
Message-ID: <Pine.OSF.4.33.0201021708100.21627-100000@is01.fas.harvard.edu>
On Wed, 2 Jan 2002, Jonas Sicking wrote:
> Actually, it can be done using the :not() pseudo-class:
>
> ul {list-style-type: disc;}
> :not(:not(ul):not(ol):not(menu):not(dir)) ul {list-style-type: circle;}
> :not(:not(ul):not(ol):not(menu):not(dir))
> :not(:not(ul):not(ol):not(menu):not(dir)) ul {list-style-type: square;}

The :not() pseudo-class described in the CSS3 selectors CR [1] doesn't
allow this, since the argument to the pseudo-class is permitted to be
only a simple selector.  The CSS3 selectors draft uses the CSS3
definition of simple selector [2], not the CSS2 definition [3].  Had the
CSS2 definition been maintained this would be less confusing (although
there would have to be a new term to describe the thing that is allowed
as the argument to the :not() pseudo-class).

-David

[1] http://www.w3.org/TR/2001/CR-css3-selectors-20011113/#negation
[2] http://www.w3.org/TR/2001/CR-css3-selectors-20011113/#simple-selectors-dfn
[3] http://www.w3.org/TR/1998/REC-CSS2-19980512/selector.html#simple-selector

-- 
L. David Baron        <URL: http://www.people.fas.harvard.edu/~dbaron/ >
Received on Wednesday, 2 January 2002 17:14:20 GMT

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