W3C home > Mailing lists > Public > www-style@w3.org > April 2009

[CSS21] 4.1.3 Characters and case: Number Sign (#) in identifiers

From: James Hopkins <james@idreamincode.co.uk>
Date: Mon, 20 Apr 2009 02:29:57 +0100
Message-Id: <1032F3DC-6AEF-4DD6-89AF-88D7F0A7BD91@idreamincode.co.uk>
To: www-style@w3.org
I am new to understanding character encoding and would like to clarify  
an aspect of the CSS 2.1 spec relating specifically to character  
entities in CSS identifiers.

The spec mentions, amongst other things, "Unicode/ISO 10646 characters  
U+00A1 and higher are allowed...", presumably without the need to be  
explicitly escaped. First of all, it's unclear to me exactly what  
"higher" refers to exactly; I suspect that it's referring to the Latin  
Supplement block (U+00A1 to U+00FF). Just for a quick sanity check, I  
validated a few random characters within this particular range and  
they all validated - is this block what the sentence from the spec  
relates to?

If I'm on the right train of thought, and based on the prose in the  
spec, the Number Sign character (U+0023) is _lower_ down the range,  
meaning that it's not a legal character in an identifier unless it's  
escaped. To check my theory, I checked a few other random characters  
in the Basic Unicode block (excluding characters [a-z0-9] ), and they  
didn't validate - out of the ones I checked, it appeared only the  
Number Sign validated.

What I'm unsure about is how the Number Sign can be a valid character  
entity (without the need for escaping) within an identifier (excluding  
the ID selector). Can someone explain how this can be, or correct me?

Thanks in advance

Received on Monday, 20 April 2009 01:30:35 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:07:35 UTC