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

On Mon, 14 Feb 2005, Anne van Kesteren wrote:
> 
> 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.

Oh, I see. IMHO that would be bad, and is not what is implemented either.

Both elements have the ID "xyz", so both should match "#xyz".

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Monday, 14 February 2005 12:42:07 UTC