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

Re: Why no Parent Selector?

From: Sjoerd Visscher <sjoerd@heeten.nl>
Date: Sun, 5 Dec 1999 02:10:57 +0100
Message-ID: <003f01bf3ebd$b5066720$1400000a@beneden>
To: "www-style" <www-style@w3.org>
I agree with Ian that :subject isn't the best way to solve this problem.
It may seem like a 'selector' but the difference is that it lets the author
select an element in a real selector, where a selector makes the UA select
an element from the document tree.
It also makes SPAN:subject B more specific than I SPAN, which shoulnd't be
the case.

I don't know if it is allowed but

[SPAN] B

instead of

SPAN:subject B

seems like a nice one to me.
It's based on old ASCI menu's, where you had

[  OK  ]  (  Cancel  )

etc.

The 'impossible' selections from Ian can be done by :subject (or an equal
solution) if it does also apply to partial selectors inside ()

>    Proposed syntax:  x:matches(y) z
>    WD syntax:        /* not possible ? */
Would be: ([x] y) z
explanation:  [x] y  matches some x, so this rule matches some z that is a
descendant of such an x

>    Proposed syntax:  a:matches(~ b) > c:matches(~ d)
>    WD syntax:        /* not possible ? */
This would then be: ([a] ~ b) > ([c] ~ d)
Note that it's a bit confusing which element is now the subject

>    bowl:contains(apple):contains(pear)
[([bowl] apple)] pear
or shorter: [[bowl] apple] pear

>    bowl:contains(fish) + cat
([bowl] fish) + cat
and [[bowl] fish] + cat
would be the same as bowl:contains(fish):contains( + cat)

>    A B:matches(C D) E
A ([B] C D) E

Sjoerd Visscher
Received on Saturday, 4 December 1999 20:16:37 GMT

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