Closed
Bug 94379
Opened 23 years ago
Closed 23 years ago
BODY style definition causes child styles to be ignored
Categories
(Core :: DOM: HTML Parser, defect)
Tracking
()
People
(Reporter: cplarosa, Assigned: harishd)
Details
The following code renders incorrectly in Mozilla 0.9.3. The words "bold and red" should appear in a bold red font: <HEAD> <STYLE> BODY {font-family: serif}; .boldred {font-weight: bold; color: red}; </STYLE> </HEAD> <BODY> This should be <SPAN CLASS="boldred">bold and red</SPAN>. </BODY> The existance of the BODY style causes the ".boldred" style to be ignored. Even if the body style definition contains no content, such as "BODY {};" the "boldred" style is still ignored. If the BODY style definition is removed completely, then the "boldred" style is rendered correctly.
Comment 1•23 years ago
|
||
It's the semi-colon after the } that is causing this. Remove it and it works. IE5 and Nav4.x and Opera5.12 doesn't seem to mind this slight error so maybe we should fix this. Reassigning to Parser for consideration.
Assignee: karnaze → harishd
Status: UNCONFIRMED → NEW
Component: Layout → Parser
Ever confirmed: true
Keywords: 4xp
QA Contact: petersen → bsharma
Comment 2•23 years ago
|
||
If this is wanted as a feature, it should be a different bug, as a feature request was not the intent of this bug. Also it is invalid CSS, as you will see in the comments at bug 92083. *** This bug has been marked as a duplicate of 92083 ***
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
Reporter | ||
Comment 3•23 years ago
|
||
Sorry, I screwed up. The semicolon after the block is not valid in either the CSS1 or the CSS2 grammer. It's interesting that the other browsers ignore it, though.
You need to log in
before you can comment on or make changes to this bug.
Description
•