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

Re: [css3-selectors] Explanation of what an id is should be non-normative

From: Øyvind Stenhaug <oyvinds@opera.com>
Date: Thu, 20 Oct 2011 11:59:29 +0200
To: "Boris Zbarsky" <bzbarsky@mit.edu>, "Bjoern Hoehrmann" <derhoermi@gmx.net>
Cc: "www-style list" <www-style@w3.org>
Message-ID: <op.v3m91fysbunlto@oyvinds-desktop>
On Thu, 20 Oct 2011 04:35:28 +0200, Bjoern Hoehrmann <derhoermi@gmx.net>  
wrote:

> * Boris Zbarsky wrote:
>> Oh, there's a problem in this case.  At least two people so far have
>> independently read this text to mean that in this testcase:
>>
>>   <style>
>>     * { color: red }
>>     #foo { color: green }
>>   </style>
>>   <div id="foo">Text</div>
>>   <div id="foo">Text</div>
>>
>> should have a green first line and a red second line because the
>> requirement that IDs be unique is normative CSS requirement...
>
> The last paragraph in the section defines how to handle this. If the
> text or the organization of the paragraphs is confusing, then the text
> should be changed so it's not confusing. Marking some sentences as not
> normative is unlikely to do that; it would be better to move the para-
> graph at the bottom before the example, for instance.

The last paragraph in section 6.5 says

"If an element has multiple ID attributes, all of them must be treated as  
IDs for that element for the purposes of the ID selector. Such a situation  
could be reached using mixtures of xml:id, DOM3 Core, XML DTDs, and  
namespace-specific knowledge."

That's one element with multiple ID attributes, not one ID attribute where  
the same value occurs for multiple elements.

-- 
Øyvind Stenhaug
Core Norway, Opera Software ASA
Received on Thursday, 20 October 2011 10:00:20 GMT

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