Skip to content

Commit 88e0039

Browse files
authored
[css-overflow] drop overflow columns and subsequent content with discard (w3c#12785)
See w3c#8721
1 parent f23c18f commit 88e0039

File tree

1 file changed

+88
-2
lines changed

1 file changed

+88
-2
lines changed

css-overflow-4/Overview.bs

Lines changed: 88 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,8 +1059,6 @@ Fragmentation of Overflow: the 'continue' property</h3>
10591059
if it is not already.
10601060
[[!CSS-BREAK-3]]
10611061
Content after the first [=region break=] is not rendered (see below).
1062-
(If the box is a [=multi-column container=],
1063-
any [=overflow columns=] are also not rendered.)
10641062

10651063
Note: This [=region break=] might be <a lt="forced break">forced</a>
10661064
(e.g. imposed by 'max-lines' or by another mechanism,
@@ -1072,6 +1070,94 @@ Fragmentation of Overflow: the 'continue' property</h3>
10721070
(such as pagination of this box itself)
10731071
do not cause any content to be discarded.
10741072

1073+
Additionally,
1074+
if the box is a [=multi-column container=],
1075+
any [=overflow columns=] are also not rendered,
1076+
nor is any subsequent content--
1077+
including any [=out of flow=] content
1078+
whose static position is in or after overflow columns,
1079+
nor is any additional [=multicol line=] or [=multicol row=]
1080+
that would be generated to hold such content.
1081+
1082+
<div class=example id=discard-overflow-column>
1083+
In the absence of the 'continue' property,
1084+
based on [[css-multicol-1 inline]],
1085+
the following markup and associated CSS would be expected
1086+
to render as follows.
1087+
1088+
<xmp highlight=markup>
1089+
<div class="multicol">
1090+
<p>Column 1</p>
1091+
<p>Column 2</p>
1092+
<p>Column 3</p>
1093+
<p>Overflow column
1094+
<div class="spanner">Spanner 1</div>
1095+
</p>
1096+
<div class="spanner">Spanner 2</div>
1097+
<p>Following 1</p>
1098+
<p>Following 2</p>
1099+
<p>Following 3</p>
1100+
<div class="spanner">Spanner 3</div>
1101+
<p>Following 4</p>
1102+
<p>Following 5</p>
1103+
<p>Following 6</p>
1104+
</div>
1105+
</xmp>
1106+
<pre><code highlight=css>
1107+
.multicol {
1108+
columns: 3;
1109+
border: solid 1px;
1110+
}
1111+
.multicol p {
1112+
break-after: column;
1113+
break-inside: avoid;
1114+
}
1115+
.spanner {
1116+
column-span: all;
1117+
text-align: center;
1118+
}
1119+
</code></pre>
1120+
<!--
1121+
ommitted because incidental to the example, but needed for an exact rendering:
1122+
p { margin: 0; }
1123+
.multicol {
1124+
width: 47ch;
1125+
font-family: monospace;
1126+
gap: 1ch;
1127+
}
1128+
-->
1129+
<figure>
1130+
<pre id=sample-rendering-overflow-multicolumn-1 style="width: 63ch">
1131+
<div style="border:solid 1px; width: 47ch;">Column 1 Column 2 Column 3 Overflow column
1132+
Spanner 1
1133+
Spanner 2
1134+
Following 1 Following 2 Following 3
1135+
Spanner 3
1136+
Following 4 Following 5 Following 6
1137+
</div></pre>
1138+
</figure>
1139+
1140+
There is one overflow column,
1141+
a spanner whose static position is within that overflow column,
1142+
another spanner whose static position is after the overflow column,
1143+
inflow content after the spanners and the overflow column,
1144+
and another spanner whose static position is in this subsequent inflow content.
1145+
1146+
If we additionally apply the following style,
1147+
everything starting from and including the overflow column is discarded.
1148+
1149+
<pre><code highlight=css>
1150+
.multicol {
1151+
continue: discard;
1152+
block-ellipsis: auto;
1153+
}
1154+
</code></pre>
1155+
<figure>
1156+
<pre id=sample-rendering-overflow-multicolumn-2>
1157+
<div style="border:solid 1px; width: 47ch;">Column 1 Column 2 Column 3…</div></pre>
1158+
</figure>
1159+
1160+
</div>
10751161
<dt><dfn>collapse</dfn>
10761162
<dd>
10771163
If the box is a [=block container=], then it must

0 commit comments

Comments
 (0)