W3C home > Mailing lists > Public > www-style@w3.org > November 1999

Why no Parent Selector?

From: David Wagner <dwagner@kevric.com>
Date: Tue, 30 Nov 1999 09:13:50 -0600
Message-ID: <C9B23C6D1899D21188F600C00D009F8606ED22@KEVRICSA1>
To: "www-style@w3.org" <www-style@w3.org>
Is there any particular reason there is no parent selector (say: <) to 
select the parent of an element?  Putting together documents, I have come 
across many cases where this would be handy, and one time needed a little 
JavaScript hack to apply a style to the parent of an element, certainly not 
the best solution for something so simple.  One example is when in a 
paragraph I include a small piece of very important text (say a 
SPAN.warning).  I would like to mark the entire paragraph (say with a 
danger icon in the margin of the paragraph).  Another simple example is  to 
draw attention to the locations of HTML editing markup, especially useful 
when working with a long document:
	DEL<P, INS<P {border-left: thick red solid;}

The drawback I can think of is the style would have to be applied after the 
UA reads the entire element to determine its contents, but this is not 
unusual; the UA often needs to do this anyway since the overall size of a 
block can depend on the sizes of the elements within.

If this seems like a good idea, I respectfully submit it to this forum as a 
suggestion.
Received on Tuesday, 30 November 1999 10:15:33 GMT

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