{css1} ID selector cannot begin with digits

VERIFIED INVALID

Status

()

Core
CSS Parsing and Computation
P3
normal
VERIFIED INVALID
19 years ago
13 years ago

People

(Reporter: Teruko Kobayashi, Assigned: Pierre Saslawsky)

Tracking

({css1})

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: css syntax, URL)

(Reporter)

Description

19 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

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

Comment 1

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

Comment 2

19 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

19 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

19 years ago
Status: NEW → RESOLVED
Last Resolved: 19 years ago
Resolution: --- → INVALID
Whiteboard: css syntax
(Assignee)

Comment 6

19 years ago
Thank you both. Closed as Invalid.

Updated

19 years ago
Status: RESOLVED → VERIFIED

Comment 7

19 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

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

Comment 10

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

Comment 11

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

Comment 12

18 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.