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)

x86
Windows 95
defect
Not set
normal

Tracking

()

VERIFIED DUPLICATE of bug 92083

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.
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
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
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.
QA Contact: bsharma → moied
verified dup of 92083

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.