W3C home > Mailing lists > Public > www-style@w3.org > July 2011

Re: [Selectors4] Reference combinators

From: Christoph Päper <christoph.paeper@crissov.de>
Date: Mon, 25 Jul 2011 11:48:40 +0200
Message-Id: <8096CC2C-CCDB-4FAD-8D59-07A5EDB6567B@crissov.de>
To: CSS WG <www-style@w3.org>
Anne van Kesteren:

> Might it be a better idea to let the markup language define how two elements are related

This would have the added benefit that the direction of the relationship didn’t matter, i.e. with the current draft you would do

  label /for/ input {}

to select the form widget and

  $label /for/ input {}

to select its label, whereas with UA knowledge of the markup language these could be, respectively,

  label // input {}

  input // label {}

> and have the reference combinator simply be "/"?

A double symbol enables it to work magically in most cases and makes it possible to add an explicit IDREF attribute where that fails. 

In the wiki page <http://wiki.csswg.org/spec/selectors4> it was also suggested to use something like

  label[for#] // input[id#] {}

to identify the source and target attributes. (It could be a single slash in this case.)
Received on Monday, 25 July 2011 09:49:20 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:42 GMT