Skip to content

Commit d994702

Browse files
Apply suggestions from code review
Co-authored-by: Florian Rivoal <git@florian.rivoal.net>
1 parent b14894c commit d994702

File tree

1 file changed

+65
-47
lines changed

1 file changed

+65
-47
lines changed

css-overflow-4/Overview.bs

Lines changed: 65 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -712,10 +712,11 @@ Indicating Block-Axis Overflow: the 'block-ellipsis' property</h3>
712712
It only affects line boxes contained directly by the <a>block container</a> itself,
713713
but as it inherits, will have an effect on descendants’ line boxes unless overridden.
714714

715-
This property only affects a line box if it immediately precedes
716-
eiher a [=region break=] or a [=clamp point=] in the [=block formatting context=].
717-
If the [=clamp point=] is placed at the end of the [=line-clamp container=], then the line will
718-
not be affected.
715+
This property only affects a line box
716+
if it immediately precedes eiher a [=region break=]
717+
or a [=clamp point=] in the [=block formatting context=].
718+
If the [=clamp point=] is placed at the end of the [=line-clamp container=],
719+
then the line will not be affected.
719720

720721
Note: See [[css-overflow-4#fragmentation]] for a way to generate boxes with such a [=region break=].
721722

@@ -784,7 +785,8 @@ Indicating Block-Axis Overflow: the 'block-ellipsis' property</h3>
784785
there is a subsequent <a>fragmentation container</a> in the [=fragmentation context=]
785786
that would receive subsequent content,
786787
then the content displaced by the <a>block overflow ellipsis</a>
787-
must be pushed to that <a>fragmentation container</a>. If it is placed before a [=clamp point=],
788+
must be pushed to that <a>fragmentation container</a>.
789+
If it is placed before a [=clamp point=],
788790
then the displaced content must be pushed to the remainder of the [=inline formatting context=].
789791

790792
The UA must treat the <a>block overflow ellipsis</a> as an unbreakable string,
@@ -849,6 +851,9 @@ Limiting Visible Lines: the 'line-clamp' shorthand property</h3>
849851
<dt><dfn><<integer [1,∞]>></dfn>
850852
<dt><dfn><'block-ellipsis'></dfn>
851853
<dd>
854+
855+
Issue(7708): Whether this should imply ''discard'' or ''collapse'' is an unresolved question.
856+
852857
Sets 'continue' to ''collapse''
853858
if either or both values ares specified.
854859

@@ -959,19 +964,20 @@ Forcing a Break After a Set Number of Lines: the 'max-lines' property</h3>
959964
Animation type: by computed value type
960965
</pre>
961966

962-
If the value of 'max-lines' is not <dfn for=max-lines dfn-type=value>none</dfn>, then, where
963-
<var>N</var> is the computed value of 'max-lines':
967+
If the value of 'max-lines' is not <dfn for=max-lines dfn-type=value>none</dfn>,
968+
then, given a [=computed value=] of <var>N</var>:
964969

965970
- If the box is a [=fragmentation container=] that captures [=region breaks=],
966-
a <a>region break</a> or
971+
a <a>region break</a>
967972
is forced after its <var>N</var>th
968973
descendant <a>in-flow</a> <a>line box</a>.
969974
If fewer than <var>N</var> line boxes exist,
970975
then 'max-lines' introduces no <a>region break</a>.
971-
- If the box is a [=line-clamp container=], its [=clamp point=] is set after its <var>N</var>th
976+
- If the box is a [=line-clamp container=],
977+
its [=clamp point=] is set after its <var>N</var>th
972978
descendant <a>in-flow</a> <a>line box</a>.
973-
If fewer than <var>N</var> line boxes exist, then the clamp point is set to the end of the
974-
line-clamp container.
979+
If fewer than <var>N</var> line boxes exist,
980+
then the clamp point is set to the end of the line-clamp container.
975981

976982

977983
Only line boxes in the same <a>Block Formatting Context</a>
@@ -1024,8 +1030,9 @@ Fragmentation of Overflow: the 'continue' property</h3>
10241030
</pre>
10251031

10261032
The 'continue' property gives authors the ability
1027-
to truncate/interrupt the content inside a box, by either visually hiding
1028-
the remaining content, or by turning the box into a [=fragmentation container=] (see [[!CSS-BREAK-3]])
1033+
to truncate/interrupt the content inside a box,
1034+
either by visually hiding the remaining content,
1035+
or by turning the box into a [=fragmentation container=] (see [[!CSS-BREAK-3]])
10291036
and discarding the content after the [=fragmentation break=].
10301037

10311038
Issue: ''continue: discard'' is meant to generalize and replace the <code>region-fragment</code> property from [[CSS-REGIONS-1]].
@@ -1134,8 +1141,8 @@ Fragmentation of Overflow: the 'continue' property</h3>
11341141
would cause intrinsic sizes to depend on layout, which would cause circularities.
11351142
-->
11361143

1137-
Note: This differs from the ''visibility: hidden''-like behavior of content after the [=clamp
1138-
point=] with ''continue: collapse''.
1144+
Note: This differs from the ''visibility: hidden''-like behavior
1145+
of content after the [=clamp point=] with ''continue: collapse''.
11391146

11401147
Note: In the case of <a href="https://www.w3.org/TR/css-break-3/#parallel-flows">parallel fragmentation flows</a>,
11411148
content occurring after the <a>fragmentation break</a> in the box tree
@@ -1164,41 +1171,52 @@ Fragmentation of Overflow: the 'continue' property</h3>
11641171

11651172
<h4 id=line-clamp-containers>Line-clamp containers</h4>
11661173

1167-
A <dfn>line-clamp container</dfn> is an [=independent formatting context|independent=] [=block formatting context=] that
1168-
additionally follows the rules in this section. All line-clamp containers contain a
1169-
<dfn>clamp point</dfn>, which is one of the following positions inside it:
1170-
1171-
- A point immediately after a [=line box=] in the line-clamp container's [=block formatting
1172-
context=].
1173-
- The end of the line-clamp container, if there are any boxes after the last [=inline formatting
1174-
context=] in the line-clamp container's [=block formatting context=].
1175-
1176-
If the [=line-clamp container=]'s [=block formatting context root=] has a [=computed value=] of
1177-
'max-lines' other than ''max-lines/none'', then that property will determine the [=clamp point=].
1178-
Otherwise, the clamp point will be set to the last possible clamp point such that, for it and
1179-
all previous possible clamp points, the line-clamp container's [=automatic block size=] (as
1180-
determined below) is not greater than the [=block size=] the box would have if its automatic
1181-
block size were infinite; or if that is not the case for any clamp points, to the first clamp
1182-
point in the block formatting context.
1183-
1184-
Any boxes in a [=line-clamp container=] that follow its [=clamp point=] in the box tree, as well
1185-
as any [=line boxes=] that follow it inside an [=inline formatting context=], will be invisible
1186-
(behaving like ''visibility: hidden''). This includes [=independent formatting contexts=] as
1187-
well as [=out-of-flow=] boxes, and all of their descendants. Any overflow such boxes and line
1188-
boxes might have is always counted as [=ink overflow=] rather than [=scrollable overflow=].
1189-
1190-
NOTE: This differs from the ''display: none''-like behavior of not rendered content with
1191-
''continue: discard''.
1192-
1193-
If a [=block container=] contains a [=clamp point=], within itself or in any of its descendants,
1174+
A <dfn>line-clamp container</dfn> is an [=independent formatting context|independent=] [=block formatting context=]
1175+
that additionally follows the rules in this section.
1176+
All line-clamp containers contain a <dfn>clamp point</dfn>,
1177+
which is one of the following positions inside it:
1178+
1179+
- A point immediately after a [=line box=]
1180+
in the line-clamp container's [=block formatting context=].
1181+
- The end of the line-clamp container,
1182+
if there are any boxes after the last [=inline formatting context=]
1183+
in the line-clamp container's [=block formatting context=].
1184+
1185+
If the [=line-clamp container=]'s [=block formatting context root=]
1186+
has a [=computed value=] of 'max-lines' other than ''max-lines/none'',
1187+
then that property will determine the [=clamp point=].
1188+
Otherwise, the clamp point will be set to the last possible clamp point
1189+
such that, for it and all previous possible clamp points,
1190+
the line-clamp container's [=automatic block size=]
1191+
(as determined below)
1192+
is not greater than the [=block size=] the box would have
1193+
if its automatic block size were infinite;
1194+
or if that is not the case for any possible clamp points,
1195+
to the first possible clamp point in the block formatting context.
1196+
1197+
Any boxes in a [=line-clamp container=] that follow its [=clamp point=] in the box tree,
1198+
as well as any [=line boxes=] that follow it inside an [=inline formatting context=],
1199+
will be invisible (behaving like ''visibility: hidden'').
1200+
This includes [=independent formatting contexts=]
1201+
as well as [=out-of-flow=] boxes,
1202+
and all of their descendants.
1203+
Any overflow such boxes and line boxes might have
1204+
is always counted as [=ink overflow=] rather than [=scrollable overflow=].
1205+
1206+
NOTE: This differs from the ''display: none''-like behavior
1207+
of not rendered content with ''continue: discard''.
1208+
1209+
If a [=block container=] contains a [=clamp point=],
1210+
within itself or in any of its descendants,
11941211
its [=automatic block size=] will not take into account any of its children after the clamp point.
11951212
This also applies for the [=line-clamp container=] itself.
11961213

1197-
NOTE: If there are any floats before the [=clamp point=], the [=line-clamp container=]'s
1198-
automatic size must grow to encompass the clearance, just like it would if it were a regular
1199-
[=block formatting context=] root that only contained its contents before the [=clamp point=].
1200-
This is regardless of whether this would cause any content after the [=clamp point=] to be
1201-
within the container's bounds.
1214+
NOTE: If there are any floats before the [=clamp point=],
1215+
the [=line-clamp container=]'s automatic size must grow to encompass the clearance,
1216+
just like it would if it were a regular [=block formatting context=] root
1217+
that only contained its contents before the [=clamp point=].
1218+
This is regardless of whether this would cause any content after the [=clamp point=]
1219+
to be within the container's bounds.
12021220

12031221
<h2 id=sbg-ext class=nonum>
12041222
Appendix A: Possible extensions for ''scrollbar-gutter''</h2>

0 commit comments

Comments
 (0)