@@ -117,40 +117,51 @@ The ::first-line pseudo-element</h3>
117117Finding the First Formatted Line</h4>
118118
119119 In CSS, the ''::first-line'' pseudo-element
120- can only have an effect when attached to a <a>block container</a> .
121- The <dfn export>first formatted line</dfn> of an element
122- must occur inside a block-level descendant in the same flow
123- (i.e., a block-level descendant that is not out-of-flow due to floating or positioning).
124-
125- <div class="example">
126- For example, the first line of the <code> DIV</code> in <code> <DIV><P>This line...</P></DIV></code>
127- is the first line of the <code> P</code>
128- (assuming that both <code> P</code> and <code> DIV</code> are blocks).
129- </div>
130-
131- The first line of a [=block container=] which does not participate in a [=block formatting context=]
132- (and likewise the first line of a [=table caption=] )
120+ can only have an effect when attached to a <a>block container</a> :
121+
122+ * The <dfn export>first formatted line</dfn> of
123+ a [=block container=] that establishes an [=inline formatting context=]
124+ contains the [=inline-level=] content of its first [=line box=] .
125+ * The [=first formatted line=] of
126+ a [=block container=] or [=multi-column container=]
127+ that contains [=block-level=] content
128+ (and is not a [=table wrapper box=] )
129+ is the [=first formatted line=] of
130+ its first [=in-flow=] [=block-level=] child.
131+ If no such line exists,
132+ it has no [=first formatted line=] .
133+
134+ Note: The [=first formatted line=] can be an empty line.
135+ For example, the first line of the <code> p</code> in
136+ <code> <p><br>First…</code>
137+ doesn't contain any letters.
138+ Thus the word “First” is not on the first formatted line,
139+ and will not be affected by ''p::first-line'' .
140+
141+ Note: The first line of a [=block container=]
142+ that does not participate in a [=block formatting context=]
133143 cannot be the first formatted line of an ancestor element.
134144 Thus, in <code> <DIV><P STYLE="display: inline-block">Hello<BR>Goodbye</P> etcetera</DIV></code>
135- the first formatted line of the <code> DIV</code> is not the line "Hello".
145+ the first formatted line of the <code> DIV</code> is not the line “Hello”,
146+ but rather the (otherwise empty) line that contains that entire inline block.
136147
137- Note: Note that the first line of the <code> p</code> in this fragment:
138- <code> <p><br>First...</code>
139- doesn't contain any letters (assuming the default style for <code> br</code> ).
140- The word "First" is not on the first formatted line.
141-
142- A user agent must act as if the fictional start tags of a ''::first-line'' pseudo-element
143- were nested just inside the innermost enclosing block-level element.
148+ When a [=first formatted line=] is represented
149+ by multiple ''::first-line'' pseudo-elements,
150+ they are nested in the same order as their [=originating elements=] .
144151
145152 <div class="example">
146- For example, the <a>fictional tag sequence</a> for
153+ Consider the following markup:
147154 <pre>
148155 <DIV>
149156 <P>First paragraph</P>
150157 <P>Second paragraph</P>
151158 </DIV>
152159 </pre>
153- is
160+
161+ If we assume a [=fictional tag sequence=] to represent
162+ the elements’ ''::first-line'' pseudo elements,
163+ it would be something like:
164+
154165 <pre>
155166 <DIV>
156167 <P><DIV::first-line><P::first-line>First paragraph</P::first-line></DIV::first-line></P>
0 commit comments