Skip to content

Commit

Permalink
[css-overflow-4] continue:discard makes the box establish an IFC
Browse files Browse the repository at this point in the history
See #10323
  • Loading branch information
frivoal committed Jun 14, 2024
1 parent d64766c commit dcc75ed
Showing 1 changed file with 2 additions and 43 deletions.
45 changes: 2 additions & 43 deletions css-overflow-4/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -975,45 +975,6 @@ Forcing a Break After a Set Number of Lines: the 'max-lines' property</h3>
If fewer than <var>N</var> line boxes exist,
then 'max-lines' introduces no <a>region break</a>.

<div class=example>
As ''continue: discard'' does not cause the element to [=establish an independent formatting context=],
lines in a nested element with 'line-clamp' are counted,
as can be seen in the examples below.
<xmp highlight=markup>
<div id=a>
a: line 1<br>
a: line 2<br>
<div id=b>
b: line 1<br>
b: line 2<br>
b: line 3<br>
b: line 4<br>
</div>
a: line 3<br>
a: line 4<br>
</div>
</xmp>
Sample rendering given <code highlight=css>#a { line-clamp: 5; } #b { line-clamp: 2; }</code>:
<pre>
a: line 1
a: line 2
b: line 1
b: line 2…
a: line 3…
</pre>

Sample rendering given <code highlight=css>#a { line-clamp: 3; } #b { line-clamp: 2; }</code>:
<pre>
a: line 1
a: line 2
b: line 1…
</pre>
Note that in the second case,
the maximum of 2 lines set on element ''#b'' does not take effect,
since a forced break is introduced
before the second line of this element.
</div>

Note: This implies that 'max-lines' has no effect when applied to [=multi-column containers=],
since any line box they contain are nested into [=independent formatting contexts=].

Expand Down Expand Up @@ -1075,15 +1036,15 @@ Fragmentation of Overflow: the 'continue' property</h3>

<dt><dfn>discard</dfn>
<dd>
The box becomes a [=fragmentation container=]
The box must [=establish an independent formatting context=]
and becomes a [=fragmentation container=]
that captures <a>region breaks</a>,
if it is not already.
[[!CSS-BREAK-3]]
Content after the first [=region break=] is not rendered (see below).
(If the box is a [=multi-column container=],
any [=overflow columns=] are also not rendered.)


Note: This [=region break=] might be <a lt="forced break">forced</a>
(e.g. imposed by 'max-lines' or by another mechanism,
such as the 'break-before'/'break-after' properties)
Expand All @@ -1095,8 +1056,6 @@ Fragmentation of Overflow: the 'continue' property</h3>
do not cause any content to be discarded.
</dl>

Note: This property does <em>not</em> cause the box to [=establish an independent formatting context=].

<div class=example>
Given an article with one excessively long overflowing line,
and four more lines than can fit in the [=fragmentation direction=] as in the illustration bellow,
Expand Down

0 comments on commit dcc75ed

Please sign in to comment.