::first-line has no effect when the first child is a block

RESOLVED DUPLICATE of bug 317081

Status

()

Core
CSS Parsing and Computation
RESOLVED DUPLICATE of bug 317081
7 months ago
7 months ago

People

(Reporter: Oriol, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

7 months ago
Created attachment 8852395 [details]
testcase

Consider this code:

    <style>
    div::first-line {
      color: green;
    }
    </style>
    <DIV><P>This line...</P></DIV>


The text remains black, unaffected by ::first-line.

This is wrong, https://drafts.csswg.org/css-pseudo-4/#first-text-line says

> For example, the first line of the DIV in <DIV><P>This line...</P></DIV>
> is the first line of the P (assuming that both P and DIV are blocks).

The text is green both on Chrome and Edge.

Updated

7 months ago
Status: NEW → RESOLVED
Last Resolved: 7 months ago
Resolution: --- → DUPLICATE
See Also: bug 1351588
Duplicate of bug: 317081
You need to log in before you can comment on or make changes to this bug.