Re: css2 - 6.4/5/6 Contextual selectors

Eric A. Meyer wrote:
>Here's a question, though.  Assume that the above syntax is adopted.  Would
>these be valid constructs and translations thereof?
>
>   DIV /~ P {...   /* P as direct child of any element following DIV */
>
>   DIV //~ P {...  /* P as direct child of any element immediately
>                      following DIV */

IMHO, not necessarily. The syntax I offered describes the relationship
between two elements. Your contructs introduce an unspecified intermediate
element, and the usefulness is dubious.

  <BODY>
  <DIV><P>No special rules apply here.</P></DIV>
  <DIV><P>Both declarations apply to this P.</P></DIV>
  <DIV><P>The first declaration would apply to this P
  if the previous DIV had no P children.</P></DIV>
  ...

>...or have I pushed things too far again?

Well, I always thought that the only way to find the true limit was to push
too far, but doing so often produces gory consequences.

David Perrell

Received on Saturday, 29 November 1997 17:48:22 UTC