{css1} ID selector cannot begin with digits

VERIFIED INVALID

Status

()

defect
P3
normal
VERIFIED INVALID
20 years ago
14 years ago

People

(Reporter: teruko, Assigned: pierre)

Tracking

({css1})

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: css syntax, )

Reporter

Description

20 years ago
ID selector cannot begin with digits in CSS1.

Steps of reproduce
1. Go to above URL

Look at the second sentence and second sentence in the Table Testing section.

Expected result
  These sentences should be black because ID selector begins with digits.

Actual result
  These sentences are red.

Tested 111508-M12 Win32 and Mac, and 111512-M12 Linux builds.

Updated

20 years ago
Summary: {css1} ID selector cannot begin with digits → {css1} ID selector cannot begin with digits

Comment 1

20 years ago
See bug 15868 (Which was resolved invalid because CSS2 allows digits to begin ID
selectors).
Assignee

Comment 2

20 years ago
That's weird: peterl closed bug 15868 saying that CSS2 no longer has this
restriction but the current spec on http://www.w3.org/TR/REC-CSS2/syndata.html#q4
reads:

    In CSS2, identifiers (including element names, classes, and IDs in selectors)
    can contain only the characters [A-Za-z0-9] and ISO 10646 characters 161
    and higher, plus the hyphen (-); they cannot start with a hyphen or a digit.

I'm not closing it yet, I'll check first.
Assignee

Comment 3

20 years ago
Ian & David, are you aware of any modification of the CSS2 spec to allow
selectors to start with a digit?
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}*)
Looks like YAE (yet another error) in the CSS2 spec. I guess we should post it
to www-style. Sigh. ("sigh" because doing so is unlikely to have much effect to
the errata document, as they are busy working on CSS3. Which IMHO can wait,
since we are no where near getting CSS_2_ implemented correctly yet. But anyway.
Enough griping for one day...)

FWIW, similar problems with the rules for class were discussed in:
   http://lists.w3.org/Archives/Public/www-style/1999Jan/0029.html
   http://lists.w3.org/Archives/Public/www-style/1999Jan/0034.html
Assignee

Updated

20 years ago
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
Whiteboard: css syntax
Assignee

Comment 6

20 years ago
Thank you both. Closed as Invalid.

Updated

20 years ago
Status: RESOLVED → VERIFIED

Comment 7

20 years ago
Verified invalid
Keywords: css1
Migrating from {css1} to css1 keyword. The {css1}, {css2}, {css3} and {css-moz}
radars should now be considered deprecated in favour of keywords.
I am *really* sorry about the spam...
Assignee

Comment 9

20 years ago
*** Bug 25471 has been marked as a duplicate of this bug. ***
Assignee

Comment 10

20 years ago
*** Bug 30207 has been marked as a duplicate of this bug. ***

Comment 11

19 years ago
*** Bug 52924 has been marked as a duplicate of this bug. ***
Assignee

Comment 12

19 years ago
*** Bug 55314 has been marked as a duplicate of this bug. ***
*** Bug 149385 has been marked as a duplicate of this bug. ***
*** Bug 292071 has been marked as a duplicate of this bug. ***
*** Bug 288373 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.