Re: [selectors4] ID selector syntax: HASH or #+IDENT?

On Tue, 19 Feb 2013 11:44:58 +0100, James Ross  
<w3-www-style-20040125@james-ross.co.uk> wrote:

>> Date: Tue, 19 Feb 2013 09:02:01 +0100
>> From: simon.sapin@kozea.fr
>> To: www-style@w3.org
>> Subject: [selectors4] ID selector syntax: HASH or #+IDENT?
>>
>> Test case:
>> data:text/html,<body id=1><style>%231{background:green
>>
>> This is green in Opera and IE, not in Firefox and Chrome. The former
>> accept any HASH for ID selectors, while the latter probably restrict the
>> syntax to valid identifiers. Internet Explorer 10 only shows this with  
>> a green background when in Document Mode: IE5 quirks for me (this mode  
>> is used as the quirks mode in IE9 and below). In all other modes (IE7  
>> standards, IE8 standards, IE9 standards, IE10 quirks and IE10  
>> standards) it does not display green.

It's a quirk in Opera/Presto as well. In no-quirks mode, we follow the CSS  
2.1 spec and treat the selector as invalid.

Also in this TC, which (for some reason) invokes limited-quirks mode:

http://test.csswg.org/suites/css2.1/20110323/html4/id-selector-005.htm
http://test.csswg.org/suites/css2.1/nightly-unstable/html4/id-selector-005.htm

-- 
Øyvind Stenhaug
Opera Software ASA

Received on Tuesday, 19 February 2013 12:22:57 UTC