W3C home > Mailing lists > Public > www-style@w3.org > June 2010

Definition of Identifier?

From: Garrett Smith <dhtmlkitchen@gmail.com>
Date: Fri, 25 Jun 2010 20:37:37 -0700
Message-ID: <AANLkTimEVftRcxrz_AiGsKqA9yUK0f1slME0dW89BdRb@mail.gmail.com>
To: www-style@w3.org
IS "--" a valid identifier?


| In CSS, identifiers  (including element names,
| classes, and IDs in selectors) can contain only the
| characters [a-zA-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 (see next item). For
| instance, the identifier "B&W?" may be written as
| "B\&W\?" or "B\26 W\3F".

That should that be changed to: "they cannot start with a digit, or a
hyphen followed by either a digit or a hyphen.

Is this right?

According to the production defined in the scanner:

That would be correct; "--" is not a valid identifier:
ident		-?{nmstart}{nmchar}*
nmstart		[_a-z]|{nonascii}|{escape}
nmchar		[_a-z0-9-]|{nonascii}|{escape}

Received on Saturday, 26 June 2010 03:38:04 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:13:47 UTC