Closed
Bug 272255
Opened 21 years ago
Closed 21 years ago
CSS ID selector ignored if ID value contains a period
Categories
(Core :: CSS Parsing and Computation, defect)
Tracking
()
VERIFIED
INVALID
People
(Reporter: pgorman, Assigned: dbaron)
Details
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8a5) Gecko/20041123
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8a5) Gecko/20041123
In the HTML/CSS below, the style is ignored when the ID value contains a period,
but is correctly applied if the period is changed to a hyphen or is dropped.
Periods are valid characters in SGML ID values.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Untitled</title>
<style type="text/css" title="text/css">
<!--
span#foo.bar {
font-size:+125%;
color: red;
}
-->
</style>
</head>
<body>
<p class="test"><span id="foo.bar">Here</span> is some text.</p>
</body>
</html>
Reproducible: Always
Steps to Reproduce:
1. Create an HTML file with the content given in "Details".
2. View the page - the style is not applied.
3. Change the period in the ID value and in the CSS ID selector to a hyphen and
reload the page. The style is applied correctly.
Actual Results:
The style is not applied when period characters occur in the ID value and in the
corresponding CSS ID selector, but is applied when the period is replaced by a
hyphen.
Expected Results:
The software should have applied the CSS style using an ID selector containing
ther period character.
This problem also appears in the FireFox browser, both Windows and Mac OSX
Comment 1•21 years ago
|
||
You have to say "#foo\.bar".
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → INVALID
Comment 2•21 years ago
|
||
Verified. Periods are valid in SGML ID values, but not in CSS "ident" tokens,
unless escaped.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•