Export (0) Print
Expand All
Expand Minimize

2.1.16 [CSS-Level2-2009] Section 5.12.1, The :first-line pseudo-element

V0018:

The specification states:

The "first formatted line" of an element may occur inside a block-level descendant 
in the same flow (i.e., a block-level descendant that is not positioned and not a 
float). E.g., 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 block-level).

Quirks Mode and IE7 Mode (All Versions)

The first line does not match when the first line of the element belongs to a block-level descendant of the element.

IE8 Mode (All Versions)

If the first line of an inline-block matches :first-line, all the lines of the inline-block also match :first-line.

All Document Modes (All Versions)

Elements contained within a parent of a :first-line pseudo-element incorrectly inherit from the parent element instead of the :first-line pseudo-element.

V0019:

The specification states:

The first line of a table-cell or inline-block cannot be the first formatted line 
of an ancestor element. Thus, in <DIV><P STYLE="display: inline-block">Hello<BR>
Goodbye</P> etcetera</DIV> the first formatted line of the DIV is not the line 
"Hello".

Quirks Mode and IE7 Mode (All Versions)

The :first-line pseudo-element is not supported for the first line of an inline-block.

IE8 Mode and IE9 Mode (All Versions)

:first-line incorrectly applies to inline-block children of a block parent; moreover, the :first-line style is applied to the entire content of the inline-block child.

Show:
© 2014 Microsoft