W3C home > Mailing lists > Public > www-style@w3.org > February 2013

[css3-syntax] Adding a "is valid identifier" flag on hash tokens

From: Simon Sapin <simon.sapin@kozea.fr>
Date: Tue, 19 Feb 2013 17:03:38 +0100
Message-ID: <5123A25A.90709@kozea.fr>
To: www-style@w3.org

So, ID selectors are tokenized as hash tokens, but are only valid if the 
part after # is a valid identifier (ie. not starting with a digit, two 
dashes, or a dash followed by a digit.)


#1 and #\31 are two hash tokens with the the same value after 
tokenization, but only the latter is a valid ID selector.

In order to allow the Selector parser to tell the difference, Syntax 
should add a "is valid identifier" flag on hash tokens.

(Another option is two have two types of tokens, but I donít like it as 
Color would have to check for both. A flag is also more consistent with 
how Syntax handles <integer>.)

Simon Sapin
Received on Tuesday, 19 February 2013 16:04:12 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:26 UTC