On Sunday 2006-10-01 21:53 +0200, Jo-W wrote: > I propose a "applies-to" selector: > > writing: > div |p| span { ... } > > would apply the css code on the <p> element instead of the <span> element. > > > This should not have the same inefficiency (and less confusion when a > human reads the selector). It does have the same ineffeciency. The inefficiency is in the concept, not the syntax. It is, however, easier to understand. And, not surprisingly, it's already been proposed before. The two main reasonably-well-designed proposals for ancestor selectors are the proposals for :subject (which your proposal is similar to, and which was in early drafts of css3-selectors[1]) and the proposal for :matches() [2]. A comparison of the two is available at [3]. -David [1] http://www.w3.org/TR/2000/WD-css3-selectors-20001005/#subject-pseudo [2] http://lists.w3.org/Archives/Public/www-style/2003Apr/0146 [3] http://lists.w3.org/Archives/Public/www-style/2002May/0018 -- L. David Baron <URL: http://dbaron.org/ > Technical Lead, Layout & CSS, Mozilla CorporationReceived on Sunday, 1 October 2006 21:19:28 GMT
This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 23 April 2007 18:22:33 GMT