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)
Tracking
()
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)
Assignee | ||
Comment 1•25 years ago
|
||
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
Assignee | ||
Comment 2•25 years ago
|
||
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!
You need to log in
before you can comment on or make changes to this bug.
Description
•