W3C home > Mailing lists > Public > www-style@w3.org > May 2000

Selectors grammar

From: Matthew Brealey <webmaster@richinstyle.com>
Date: Mon, 15 May 2000 15:49:54 -0700
Message-ID: <39207F12.21F2@richinstyle.com>
To: www-style@w3.org
The grammar is not quite right (unless the selector ignore rules are
changed (see *)). The old HASH token is reused, but it is not suitable
for the purpose for which it is employed P#100 under the spirit of CSS
should be ignored, but will not be, since it is a valid (CSS) NAME. The
hexcolor production should be defined as 
hexcolor
  : "#" HEXCOLOR
  ;

HEXCOLOR is simply {h}{3,6}

ID should be 

id:
 : "#" ID
 ;

with ID defined as

{idstart}{idchar}*

with 
idstart	[a-z]|{escape}
idchar	[a-z0-9-]|{escape}

These definitions are better in that, as well as removing the error,
they address the anomalous situation whereby P./* */class is valid, but
P#/* */id is not (P/* */#id is).

* http://lists.w3.org/Archives/Public/www-style/2000Jan/0194.html

-----------------------------------
Please visit http://RichInStyle.com. Featuring:
MySite: customizable styles.         AlwaysWork style 
Browser bug table covering all CSS2 with links to descriptions.
Lists of > 1000 browser bugs         Websafe Colorizer 
	CSS2, CSS1 and HTML4 tutorials.      CSS masterclass 
CSS2 test suite: 5000++ tests and 300+ test pages.
Received on Monday, 15 May 2000 10:44:40 GMT

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