CSS :first-child not rendered

RESOLVED INVALID

Status

()

Core
CSS Parsing and Computation
RESOLVED INVALID
14 years ago
14 years ago

People

(Reporter: Nicholas Shewmaker, Assigned: dbaron)

Tracking

1.7 Branch
x86
Windows 2000
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

14 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.6) Gecko/20050223 Firefox/1.0.1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.6) Gecko/20050223 Firefox/1.0.1

Settings in CSS for :first-child pseudo-element are ignored.  I have seen this
as p:first-child (See attached code.) and tr:first-child.

Reproducible: Always

Steps to Reproduce:
<style type="text/css">
p:first-child {
  font-size: 200%;
}
em {
  color: green;
}
</style>
...
<p>This is a <em>test</em> paragraph.</p>
Actual Results:  
"test" is green but not 200%.

Expected Results:  
"test" should be green and 200%.

Updated

14 years ago
Assignee: firefox → chase
Component: General → Build Config
Product: Firefox → Core
QA Contact: general
Version: unspecified → 1.7 Branch

Updated

14 years ago
Assignee: chase → dbaron
Component: Build Config → Style System (CSS)
QA Contact: ian
p:first-child is a p element that is the first child of its parent, not the
first child of a p element.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → INVALID

Comment 2

14 years ago
http://www.w3.org/TR/CSS21/selector.html#q1
"E:first-child	Matches element E when E is the first child of its parent."
You need to log in before you can comment on or make changes to this bug.