Closed
Bug 241747
Opened 20 years ago
Closed 20 years ago
CSS doesn't work when style name begin with numeric character
Categories
(Core :: CSS Parsing and Computation, defect)
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:
Reporter | ||
Comment 1•20 years ago
|
||
It has the mistake.
Reporter | ||
Comment 2•20 years ago
|
||
The second character is not numeric.
Reporter | ||
Comment 3•20 years ago
|
||
The first character is not numeric.
Reporter | ||
Comment 4•20 years ago
|
||
Comment 5•20 years ago
|
||
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: 20 years ago
Resolution: --- → INVALID
Comment 6•20 years ago
|
||
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.
Description
•