BODY style definition causes child styles to be ignored

VERIFIED DUPLICATE of bug 92083

Status

()

VERIFIED DUPLICATE of bug 92083
18 years ago
17 years ago

People

(Reporter: cplarosa, Assigned: harishd)

Tracking

Trunk
x86
Windows 95
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

18 years ago
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

18 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
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
Last Resolved: 18 years ago
Resolution: --- → DUPLICATE
(Reporter)

Comment 3

18 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.

Updated

17 years ago
QA Contact: bsharma → moied

Comment 4

17 years ago
verified dup of 92083

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