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

forwarded message from Eric A. Meyer

From: Hakon Lie <howcome@w3.org>
Date: Sat, 31 Jan 1998 23:32:16 +0100 (MET)
Message-Id: <199801312232.XAA17519@stovner.a.sol.no>
To: www-style@w3.org

attached mail follows:

On Fri, 30 Jan 1998, Andrew n. marshall wrote:

> I've browsed through the new selectors and thing they work very well.
> I was just hoping someone could explain the need for the '*' operator 
> (grandchild or greater descendant).  Not that I care if it remains, but I 
> just can't figure out where it might be needed.

   Actually, if I've read the specification correctly, there is no such
operator-- although I thought exactly as you did when I first read the
selectors section.  If I recall correctly (I don't have the spec in front of
me), the example was something like this:

   DIV * P {rule;}

...which is explained as matching any P which is a grandchild or later of the
DIV.  This isn't a grandchild selector; instead, it's a series of descendant
selectors.  The best transliteration of the declaration above might be, "Any
P which is the descendant of ANY element which is the descendant of a DIV
will use this rule."  The asterisk isn't a grandchild selector, it's a
universal selector in the middle of a chain.
   Another description of the rule would be that it will match any P which is
a descendant of a DIV, provided that P is not a direct child of the DIV.  The
original description is perfectly valid.  It's just a little bit misleading. 

                              -- EMeyer

Eric A. Meyer  #  eam3@po.cwru.edu  #  http://www.cwru.edu/home/eam3.html
   Hypermedia Systems Manager
   Digital Media Services              http://www.cwru.edu/dms/dms.html
   Case Western Reserve University     http://www.cwru.edu/
Received on Saturday, 31 January 1998 17:32:44 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:26:46 UTC