[css-pseudo] Clearer ::first-line definition #1158
Labels
Closed Accepted as Editorial
Closed Accepted as Obvious Bugfix
Commenter Satisfied
Commenter has indicated satisfaction with the resolution / edits.
css-pseudo-4
Current Work
CSS Pseudo-Elements says
But which block-level descendant? The spec is so vague. It should be more clear. I tried to fill the gaps with what current implementations do, I think it would be
::first-line
pseudo-element if the first in-flow block-level child is also a block container with a::first-line
. In that case, the::first-line
is nested just outside the::first-line
of that child.::first-line
pseudo-element. The::first-line
is nested inside the block container as outermost as possible, and contains the inline-level boxes in the first line box.::first-line
pseudo-element.This would make this example more understandable: https://jsfiddle.net/oyw62a3t/
Since the
p
element contains no line, the first line of thediv
is Foo. However, Foo is red on Firefox, Chrome and Edge. This seems strange with the current definition, but in my proposal it becomes clear.The text was updated successfully, but these errors were encountered: