W3C CSS2+ class names support underscores (_)

VERIFIED FIXED in mozilla0.9

Status

()

Core
CSS Parsing and Computation
P2
normal
VERIFIED FIXED
17 years ago
15 years ago

People

(Reporter: James Green, Assigned: glazou)

Tracking

Trunk
mozilla0.9
x86
All
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(2 attachments)

(Reporter)

Description

17 years ago
The W3C Errata page at
http://www.w3.org/Style/css2-updates/REC-CSS2-19980512-errata now gives support
for the underscore (_) character in CSS class names.

Example:
   a.foo-bar { text-decoration: underline; }
could now be
   a.foo_bar { text-decoration: underline; }
too.

This apparently needs to be done to be conformant with xml 'name'... Needs to be
added to Mozilla ASAP to prevent more bugs filed by web authors who are already
using _ as IE5 supports it I believe *sigh*.
(Reporter)

Comment 1

17 years ago
-> Daniel who says he can do this quickly.
Assignee: pierre → glazman
Keywords: mozilla0.9

Comment 2

17 years ago
moz0.9
Priority: -- → P2
Target Milestone: --- → mozilla0.9
(Assignee)

Comment 3

17 years ago
Created attachment 30132 [details] [diff] [review]
easy fix for 74845
(Assignee)

Comment 4

17 years ago
Accepting assignment.

Easy 1-line fix proposed above. Since this errata derives from the XML spec
stating :

  [4] NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' | CombiningChar | Extender
  [5] Name ::= (Letter | '_' | ':') (NameChar)*

all NAME identifiers should be able to contain an underscore or start with an
underscore.

r= and sr= needed please.
Status: NEW → ASSIGNED
(Assignee)

Comment 5

17 years ago
Created attachment 30135 [details]
test case for underscores in css identifiers

Comment 6

17 years ago
r=bzbarsky@mit.edu

testcase looks good with the patch.

Comment 7

17 years ago
sr=attinasi

Comment 8

17 years ago
r=pierre
(Assignee)

Comment 9

17 years ago
checked in
Status: ASSIGNED → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED
(Reporter)

Comment 10

17 years ago
Verified fixed on Linux, can someone do the same on Mac/Win32 please.
verified by testcase
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.