W3C home > Mailing lists > Public > www-style@w3.org > February 2005

Re: [css21] multiple ID attributes with the same value

From: Anne van Kesteren <fora@annevankesteren.nl>
Date: Mon, 14 Feb 2005 13:17:50 +0100
Message-ID: <421096EE.9000104@annevankesteren.nl>
To: Ian Hickson <ian@hixie.ch>
CC: W3C CSS List <www-style@w3.org>

Ian Hickson wrote:
> On Sun, 13 Feb 2005, Anne van Kesteren wrote:
>> Would it be possible that CSS 2.1 specifies something similar to
>> XPath 1.0[1]? Something in the lines of: "When multiple ID
>> attributes with the same attribute value are found only the first
>> should be considered significant."
> 
> What does that mean?

That in a document such as:

  <foo>
   <bar xml:id="xyz"/>
   <bar xml:id="xyz"/>
  </foo>

... with the following style rule applied:

  bar{ background:lime }
  #xyz{ background:red }
  bar#xyz:first-child{ background:lime }

... there is no red.

Only the first element with a not unique ID attribute in such a
well-formed, but invalid document, is styled.


-- 
  Anne van Kesteren
  <http://annevankesteren.nl/>
Received on Monday, 14 February 2005 12:18:04 GMT

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