- From: L. David Baron <dbaron@fas.harvard.edu>
- Date: Wed, 2 Jan 2002 17:14:17 -0500 (EST)
- To: <www-style@w3.org>
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 UTC