This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Reported by Kang-Hao (Kenny) Lu G.1 defines the simple_selector production as follows: # simple_selector # : element_name [ HASH | class | attrib | pseudo ]* # | [ HASH | class | attrib | pseudo ]+ # ; This fails to alert the reader to the fact that the ID selector has constraints. This is in contrast to # /* # * There is a constraint on the color that it must # * have either 3 or 6 hex-digits (i.e., [0-9a-fA-F]) # * after the "#"; e.g., "#000" is OK, but "#abcd" is not. # */ # hexcolor # : HASH S* # ; where contraints are noted. Conversation begins: Bug description: http://lists.w3.org/Archives/Public/www-style/2012May/0770.html
Kang-Hao (Kenny) Lu proposes adding a comment as follows: | /* | * There is a constraint on the ID selector that the part after | * "#" should match an IDENT; e.g., "#abc" is OK, but "#1st" is not. | */ | simple_selector | [...] http://lists.w3.org/Archives/Public/www-style/2012May/0770.html Tab Atkins Jr. agrees, provided that it's web-compatible; else he proposes changing the validity of ID selectors to match UA behaviour. http://lists.w3.org/Archives/Public/www-style/2012May/0873.html