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:

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

... 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
Received on Monday, 14 February 2005 12:18:04 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:17 UTC