Yahia Chlyeh wrote: >> div.content p.description a:link:ancestor(div.content >> p.description) /* more specific */ > > Wouldn't that allow any selector to be specified there (between > parentheses), rather than an actual ancestor? It would, and the selector should only be true if both cases are true: 1. The element is an ancestor of the first selected element, "div.content p.description a:link" 2. The element matches the :ancestor selector, "div.content p.description" > If so, the nomination :ancestor should be changed. > > This may be widely better: > element:nth-ancestor(#) But that implies a known distance up the DOM tree or selector tree. The previous example allows for selectors at an arbitrary distance from the descendant. Perhaps both would be useful. :ancestor( selector ) :nth-ancestor( numeric ) JamesReceived on Wednesday, 25 April 2007 14:47:28 GMT
This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:50 GMT