Closed Bug 241747 Opened 22 years ago Closed 22 years ago

CSS doesn't work when style name begin with numeric character

Categories

(Core :: CSS Parsing and Computation, defect)

x86
Windows 98
defect
Not set
normal

Tracking

()

VERIFIED INVALID

People

(Reporter: foripepe, Assigned: dbaron)

References

()

Details

Attachments

(4 files)

User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7b) Gecko/20040421 Build Identifier: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7b) Gecko/20040421 When a style name first character is numeric, and we use it with style and class tags, the Mozilla can't visualize it. This code has the mistake: <html><head> <style type="text/css"> .12 { font-weight: bold; font-size: 12; color: ffe400; font-family: Arial, Helvetica, sans-serif; } </style> </head> <body> <div class="12">(12)</div> </body></html> The (12) hasn't got any style. Second code (the style's name second character is not numeric, but it's not enough to avoid the mistake): <html><head> <style type="text/css"> .1a2 { font-weight: bold; font-size: 12; color: ffe400; font-family: Arial, Helvetica, sans-serif; } </style> </head> <body> <div class="1a2">(12)</div> </body></html> The (12) hasn't got any style too. These codes are good: 1) The fist character not numeric <html><head> <style type="text/css"> .a12 { font-weight: bold; font-size: 12; color: ffe400; font-family: Arial, Helvetica, sans-serif; } </style> </head> <body> <div class="a12">(12)</div> </body></html> The (12) has got style. 2) There isn't any <style> and class tags, only "style". <html> <body> <div style="font-weight: bold;font-size: 12;color: ffe400;font-family: Arial, Helvetica, sans-serif;">(12)</div> </body></html> The (12) has got style too. Reproducible: Always Steps to Reproduce:
Attached file The first example. —
It has the mistake.
The second character is not numeric.
Attached file It's good. —
The first character is not numeric.
Attached file This is good too. —
There are so many errors in that CSS I don't even know where to begin. I suggest you take a look at: http://jigsaw.w3.org/css-validator/
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → INVALID
Verified. In particular, class names may not start with a digit in CSS.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: