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

On Tue, Apr 21, 2009 at 5:35 PM, James Hopkins <james@idreamincode.co.uk> wrote:
> Based on your feedback, my conclusion is that 4.1.3 is in this respect is
> unclear. The current spec states "... [identifiers] can contain only the
> characters [a-z0-9] and ISO 10646 characters U+00A1 and higher, plus the
> hyphen (-) and the underscore (_); they cannot start with a digit, or a
> hyphen followed by a digit. Identifiers can also contain escaped characters
> and any ISO 10646 character as a numeric code ..." If indeed the Number Sign
> is lower than U+00A1 then how can it be acceptable within in an identifier,
> without being escaped?

Why do you think that # is acceptable in identifiers without being
escaped?  It would be syntactically ambiguous: does .foo#bar mean an
element with class "foo#bar", or an element with class "foo" and id
"bar"?  It's the latter, since # is not permitted unescaped inside
identifiers.

Received on Tuesday, 21 April 2009 21:43:43 UTC