Closed
Bug 15868
Opened 25 years ago
Closed 25 years ago
ID selector cannot begin with digit
Categories
(Core :: CSS Parsing and Computation, defect, P3)
Tracking
()
VERIFIED
INVALID
People
(Reporter: jls.bugz, Assigned: peterl-retired)
References
()
Details
CSS1 spec says ID selectors can't begin with digits. Build 1999100715 renders the listed URL improperly - sentence reading "this sentence should be black, not red" is in fact red. ID is described as "#1".
Assignee | ||
Updated•25 years ago
|
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → INVALID
Assignee | ||
Comment 1•25 years ago
|
||
CSS2 no longer has this restriction.
Updated•25 years ago
|
Status: RESOLVED → VERIFIED
Comment 2•25 years ago
|
||
Verified invalid
*** Bug 223858 has been marked as a duplicate of this bug. ***
Comment 7•21 years ago
|
||
Could you indicate where in CSS2 it says that ID's can start with a Digit as indicated in comment 2? I just checked CSS2 and the drafts of CSS2.1 and CSS3, the three documents say that it is not allowed. I also looked for erratas that would have been published and public CSS discussion lists, all the messages I found say that identifiers can't start with a digit. http://www.w3.org/TR/CSS2/syndata.html#q4 http://www.w3.org/TR/CSS21/syndata.html#q6 http://www.w3.org/TR/2003/WD-css3-syntax-20030813/#characters More specifically, this bug seems to be consider as invalid because you consider that chapter 4 of CSS2 should follow the grammar " ID selectors match the HASH production which is "#"{name}, where name is {nmchar}+ (as opposed to ident, which is {nmstart}{nmchar}*)" http://bugzilla.mozilla.org/show_bug.cgi?id=18936#c4 But on the CSS list, Bert Boss responding to Ian Hickson about it said : "Indeed. This error in the grammar seems to haunt us, and this time again we forgot to correct it :-( The intention is that class names may not start with a digit, so the error is in the grammar." http://lists.w3.org/Archives/Public/www-style/1999Jan/0034.html I have to say that I am a bit confused, the grammar is difficult to read and understand since I am no computer scientist but I have the feeling that "#"{name} was thought to allow hexadecimal color values, not for ID's, otherwise why wasn't it changed in chapter 4.1.3 of CSS2.1 which is a Last Call Working Draft ?
You need to log in
before you can comment on or make changes to this bug.
Description
•