- From: Andrew n marshall <amarshal@usc.edu>
- Date: Fri, 5 Dec 1997 10:18:39 -0800
- To: "'Douglas Rand'" <drand@sgi.com>
- Cc: "'www-style@w3.org'" <www-style@w3.org>
Try these... On Friday, December 05, 1997 7:58 AM, Douglas Rand [SMTP:drand@sgi.com] wrote: > No, it doesn't. If I have a tree where DIV.Chapter has a number > of children, e.g. a table, I might want to write selectors like > this: > > DIV.Chapter P:child[TD] { ... } Current spec: DIV.Chapter TD ~ P {...} My spec (same): DIV.Chapter TD ~ P {...} > DIV.Chapter P:child[DIV.Chapter] { ... } Current Spec: DIV.Chapter ~ P, DIV.Chapter DIV.Chapter ~ P {...} although I doubt the second case was intended, your notation does include it. My spec (same): DIV.Chapter ~ P, DIV.Chapter DIV.Chapter ~ P {...} > DIV.Chapter P:first-child[DIV.Chapter] { ... } Current spec; DIV.Chapter ~ //P/, DIV.Chapter DIV.Chapter ~ //P/ {...} Again, your notation accidently include the second case. David's/My spec: DIV.Chapter ~ P:first, DIV.Chapter DIV.Chapter ~ P:first {...} This actually isn't exactly correct since David's notation specifies 'first of it's kind'. Maybe there is a need for both pseudo-classes ":first" and ":first-child". Thoughts? > That is one of the reasons that the / stuff is awkward to me. I > think it is extremely reasonable to have arbitrary qualifiers. > An example: > > P:child[TD]:grandchild[TR.special] { ... } Current spec: TR.special ~ TD ~ P {...} My spec (same): TR.special ~ TD ~ P {...} > Of course the whole thing can get out of hand. But you get the > idea of the sorts of things that might be nice to do. I suspect > that child and sibling relationships, along with some sort of > child count constraint (at least first and last and not first or last) > would be sufficient. The fact that your notation can get out of hand is plenty of reason not to use it. I think your biggest problem is in realizing ancestoral relationship occur ancestor to descendant, left to right, just like in CSS-1, but now there is the possibility to qualify an immediate relationship (child). Andrew n marshall student - artist - programmer http://www.media-electronica.com/anm-bin/anm "Everyone a mentor, Everyone a pupil"
Received on Friday, 5 December 1997 13:14:28 UTC