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

Re: class / ident / numbers

From: Bert Bos <bert@w3.org>
Date: Fri, 18 Apr 2003 21:00:47 +0200
Message-ID: <16032.19295.538871.767323@lanalana.inria.fr>
To: www-style@w3.org

Michael Day writes:
> 
> 
> Hi,
> 
> The CSS3 Selectors test cases state that this is not a valid class 
> selector:
> 
> .\5cm { ... }
> 
> However "\5cm" seems to be a valid identifier, according to the definition
> of the CSS syntax, as it begins with an escaped char. There doesn't appear
> to be anything in the spec saying that class cannot begin with a digit. 
> What have I overlooked?

The test doesn't say that the selector is invalid. It only says that
the element and the selector don't match.

Test 155a[1] states that

    .\5cm {background: red}

does not make

    <p class="5cm">

red. Which is indeed the case, since "\5cm" is an identifier
consisting of two letters ("\" and "m"), while "5cm" consist of three
("5", "c" and "m").


[1] http://www.w3.org/Style/CSS/Test/CSS3/Selectors/current/html/tests/css3-modsel-155a.html



Bert
-- 
  Bert Bos                                ( W 3 C ) http://www.w3.org/
  http://www.w3.org/people/bos/                              W3C/ERCIM
  bert@w3.org                             2004 Rt des Lucioles / BP 93
  +33 (0)4 92 38 76 92            06902 Sophia Antipolis Cedex, France
Received on Friday, 18 April 2003 15:00:48 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:21 GMT