Last Comment Bug 74845 - W3C CSS2+ class names support underscores (_)
: W3C CSS2+ class names support underscores (_)
Status: VERIFIED FIXED
:
Product: Core
Classification: Components
Component: CSS Parsing and Computation (show other bugs)
: Trunk
: x86 All
: P2 normal (vote)
: mozilla0.9
Assigned To: Daniel Glazman (:glazou)
: Hixie (not reading bugmail)
: Jet Villegas (:jet)
Mentors:
http://www.w3.org/Style/css2-updates/...
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2001-04-05 02:13 PDT by James Green
Modified: 2002-10-25 18:12 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
easy fix for 74845 (572 bytes, patch)
2001-04-09 05:32 PDT, Daniel Glazman (:glazou)
no flags Details | Diff | Splinter Review
test case for underscores in css identifiers (767 bytes, text/html)
2001-04-09 05:43 PDT, Daniel Glazman (:glazou)
no flags Details

Description User image James Green 2001-04-05 02:13:57 PDT
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*.
Comment 1 User image James Green 2001-04-05 02:16:47 PDT
-> Daniel who says he can do this quickly.
Comment 2 User image rubydoo123 2001-04-09 04:39:45 PDT
moz0.9
Comment 3 User image Daniel Glazman (:glazou) 2001-04-09 05:32:30 PDT
Created attachment 30132 [details] [diff] [review]
easy fix for 74845
Comment 4 User image Daniel Glazman (:glazou) 2001-04-09 05:35:57 PDT
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.
Comment 5 User image Daniel Glazman (:glazou) 2001-04-09 05:43:42 PDT
Created attachment 30135 [details]
test case for underscores in css identifiers
Comment 6 User image Boris Zbarsky [:bz] (still a bit busy) 2001-04-09 09:10:09 PDT
r=bzbarsky@mit.edu

testcase looks good with the patch.
Comment 7 User image Marc Attinasi 2001-04-09 09:28:40 PDT
sr=attinasi
Comment 8 User image Pierre Saslawsky 2001-04-10 02:50:56 PDT
r=pierre
Comment 9 User image Daniel Glazman (:glazou) 2001-04-10 04:11:04 PDT
checked in
Comment 10 User image James Green 2001-04-11 08:04:48 PDT
Verified fixed on Linux, can someone do the same on Mac/Win32 please.
Comment 11 User image Hixie (not reading bugmail) 2002-10-25 18:12:18 PDT
verified by testcase

Note You need to log in before you can comment on or make changes to this bug.