Closed Bug 25471 Opened 25 years ago Closed 25 years ago

Classes and IDs cannot start with a dash or a digit, styles must be ignored

Categories

(Core :: CSS Parsing and Computation, defect, P3)

x86
All
defect

Tracking

()

VERIFIED DUPLICATE of bug 18936

People

(Reporter: mozilla, Assigned: pierre)

References

()

Details

According to http://www.w3.org/TR/REC-html40/types.html values of the ID Attribut cannot start with a number (e.g. ID=1 -> #1 { /* style */ } ). According to http://www.w3.org/TR/REC-CSS1#forward-compatible-parsing such an illegal declaration must be ignored. Tested on M13, win32 (NT 4 SP 4)
It may be an error in the CSS2 spec but for now IDs can start with a digit (not classes). See bug 18936 for the whole story, especially the comments from David Baron on 1999-11-16 06:30: --- Yes. See the grammar: http://www.w3.org/TR/REC-CSS2/grammar.html . ID selectors match the HASH production which is "#"{name}, where name is {nmchar}+ (as opposed to ident, which is {nmstart}{nmchar}*) --- *** This bug has been marked as a duplicate of 18936 ***
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → DUPLICATE
I forgot to thank you for the excellent attached testcase. I wish we had more like these, it really makes the job much easier. Thanks-a-lot!
Verified dup of #18936
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.