On Monday 21 August 2006 01:10, David Hyatt wrote: > A parent selector is also extremely difficult to implement, > especially dynamic cases. > Not really. It would only take me a few hours to implement it in KHTML. A 40 line recursive function could do it. The dynamic restyling framework I wrote to correctly track the current child to parent or uncle relationships can easily track cousin to cousin relationships as well. Compared to inheriting ::first-letter or ::first-line styles (part of CSS 2.1), a parent or later sibling selector is trivial. The syntax and structure I've been considering is based a parentheses. Where a parenthesis selects left instead of right: For instance: (A > B) Selects any A element with a B child. (A > B) + C Selects any C element with a A direct sibling that has a B child. The code needed to implement this is a simple variant of the current recursive selector matcher. `AllanReceived on Monday, 21 August 2006 00:13:56 GMT
This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:46 GMT