According the CSS Level 3 specification, for parsing the start of an identifier, you:
Check if three code points would start an identifier
Look at the first code point:
- If the first character is
-, then we have a valid identifier if:- The second code point is an identifier-start code point (
[a-zA-Z_]or non-ASCII). - The second code point is
-. - The second and third character form a valid escape.
- The second code point is an identifier-start code point (
Otherwise, we do not have a valid identifier start. After determining if we have a valid identifier start, the only requirements to have a valid <ident-token> is we have 0 or more of any combination of the following:
- Escape tokens
- ASCII letters
- Digits
_or-- Non-ASCII characters
Since we do not require any characters following an identifier start token, this would suggest that -- is a valid identifier, even if never supported by any browser or framework. However, even official CSS validation services (maintained by those that design the CSS specifications) do not consider this a valid identifier. Is this merely a bug in the validation service?