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

Re: [selectors] Attribute Selector Values Beginning with Digits

From: Boris Zbarsky <bzbarsky@mit.edu>
Date: Tue, 07 Feb 2006 10:57:19 -0600
Message-ID: <43E8D16F.6070203@mit.edu>
To: Lachlan Hunt <lachlan.hunt@lachy.id.au>
CC: www-style <www-style@w3.org>

Lachlan Hunt wrote:
>   For the attribute value selectors, is it required that values 
> beginning with digits must either be quoted or the first digit escaped? 

Yes.  See 
http://www.w3.org/TR/2005/WD-css3-selectors-20051215/#attribute-representation 
and http://www.w3.org/Style/Group/css2-src/selector.html#q10 and 
http://www.w3.org/TR/CSS2/selector.html#q10 all of which have the same language 
after the list of the four attribute selectors:

   Attribute values must be identifiers or strings.

Since 0 is not an identifier, the selector [title=0] is invalid and a conforming 
UA must discard the corresponding rule.

-Boris
Received on Tuesday, 7 February 2006 16:58:24 GMT

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