Skip to content

Commit 12d393e

Browse files
committed
[css-overflow-3] Reorganize sections
Better grouping for better readability
1 parent f8d6b33 commit 12d393e

File tree

1 file changed

+134
-126
lines changed

1 file changed

+134
-126
lines changed

css-overflow-3/Overview.bs

+134-126
Original file line numberDiff line numberDiff line change
@@ -499,8 +499,11 @@ as the Flow-Relative box model properties defined in [[css-logical-1#box]].
499499
'overflow-x' and 'overflow-y' properties.
500500
The mapping depends on the element's 'writing-mode'.
501501

502-
<h2 id="text-overflow" caniuse="text-overflow">
503-
Overflow Ellipsis: the 'text-overflow' property</h2>
502+
<h2 id="auto-ellipsis">
503+
Automatic Ellipses</h3>
504+
505+
<h3 id="text-overflow" caniuse="text-overflow">
506+
Overflow Ellipsis: the 'text-overflow' property</h3>
504507

505508
<pre class="propdef">
506509
Name: text-overflow
@@ -555,7 +558,7 @@ on a line
555558
must be clipped rather than ellipsed.
556559

557560
<div class=example>
558-
<h3 id="bidi-ellipsis" class="no-num no-toc">Bidi ellipsis examples</h3>
561+
<h4 id="bidi-ellipsis" class="no-num no-toc">Bidi ellipsis examples</h4>
559562
These examples demonstrate which characters get hidden
560563
to make room for the ellipsis in a bidi situation:
561564
those visually at the end edge of the line.
@@ -583,7 +586,7 @@ Sample HTML fragments, renderings, and your browser:
583586

584587
</div>
585588

586-
<h3 id="ellipsing-details" class="no-num no-toc">ellipsing details</h3>
589+
<h4 id="ellipsing-details" class="no-num no-toc">ellipsing details</h4>
587590
<ul>
588591
<li>
589592
Ellipsing only affects rendering and must not affect layout
@@ -602,7 +605,7 @@ then clip the rendering of the ellipsis itself
602605
would have otherwise been clipped with the ''text-overflow:clip'' value).
603606
</ul>
604607

605-
<h3 id="ellipsis-interaction" class="no-num no-toc">user interaction with ellipsis</h3>
608+
<h4 id="ellipsis-interaction" class="no-num no-toc">user interaction with ellipsis</h4>
606609
<ul>
607610
<li>When the user is interacting with content
608611
(e.g. editing, selecting, scrolling),
@@ -616,7 +619,7 @@ Behavior of partially-selected ellipsed text is up to the UA.
616619
</ul>
617620

618621
<div class="example"><p style="display:none">Example(s):
619-
<h3 id="text-overflow-examples" class="no-num no-toc">text-overflow examples</h3>
622+
<h4 id="text-overflow-examples" class="no-num no-toc">text-overflow examples</h4>
620623

621624
These examples demonstrate setting the text-overflow of a block container element
622625
that has text which overflows its dimensions:
@@ -716,7 +719,7 @@ to represent that clipped content.
716719

717720
<!-- insert RTL example diagram here to illustrate note. -->
718721

719-
<h3 id="ellipsis-scrolling" class="no-num no-toc">ellipsis interaction with scrolling interfaces</h3>
722+
<h4 id="ellipsis-scrolling" class="no-num no-toc">ellipsis interaction with scrolling interfaces</h4>
720723

721724
This section applies to elements with text-overflow other than ''text-overflow:clip''
722725
(non-clip text-overflow)
@@ -779,8 +782,118 @@ having it overlap other text by default.
779782

780783
While the content is being scrolled, implementations may adjust their rendering of ellipses (e.g. align to the box edge rather than line edge).
781784

782-
<h2 id=line-clamp>
783-
Limiting Visible Lines: the 'line-clamp' shorthand property</h2>
785+
<h3 id="block-ellipsis">
786+
Indicating Block-Axis Overflow: the 'block-overflow' property</h3>
787+
788+
<pre class=propdef>
789+
Name: block-overflow
790+
Value: clip | ellipsis | <<string>>
791+
Initial: clip
792+
Applies to: [=block containers=]
793+
Inherited: yes
794+
Percentages: N/A
795+
Computed value: specified value
796+
</pre>
797+
798+
This property allows inserting content into the last line box
799+
before a (forced <em>or</em> unforced) <a>region break</a>
800+
to indicate the continuity of truncated/interrupted content.
801+
It only affects line boxes contained directly by the <a>block container</a> itself,
802+
but as it inherits, will have an effect on descendants’ line boxes unless overridden.
803+
If the box contains no line box immediately preceding a <a>region break</a>,
804+
then this property has no effect.
805+
806+
Note: See [[#fragmentation]] for a way to generate boxes with such a [=region break=].
807+
808+
ISSUE: Should this apply to other types of fragmentation breaks (e.g. pages, columns)?
809+
810+
The inserted content is called the <dfn>block overflow ellipsis</dfn>.
811+
Values have the following meanings:
812+
813+
<dl dfn-for="block-overflow" dfn-type=value>
814+
<dt><dfn>clip</dfn>
815+
<dd>
816+
The rendering is unaffected.
817+
818+
<dt><dfn>ellipsis</dfn>
819+
<dd>
820+
Render an ellipsis character (U+2026)--
821+
or a more typographically-appropriate equivalent--
822+
as the <a>block overflow ellipsis</a>
823+
at the end of the affected line box.
824+
UAs should use the conventions of the
825+
<a>content language</a>,
826+
writing system, and
827+
<a>writing mode</a>
828+
to determine the most appropriate ellipsis string.
829+
830+
<dt><dfn><<string>></dfn>
831+
<dd>
832+
Render the specified string
833+
as the <a>block overflow ellipsis</a>
834+
at the end of the affected line box.
835+
The UA may truncate this string if it is absurdly long.
836+
</dl>
837+
838+
When 'block-overflow' is not ''block-overflow/clip'',
839+
the <a>block overflow ellipsis</a> string
840+
is wrapped in an anonymous inline
841+
and placed at the end of the line box
842+
as a direct child of the <a>block container</a>’s <a>root inline box</a>,
843+
reducing the space in the line box
844+
available to the other contents of the line.
845+
This inline is assigned ''unicode-bidi: plaintext''
846+
and is placed in the line box after the last
847+
<a>soft wrap opportunity</a> [[!CSS-TEXT-3]]
848+
that would still allow the entire <a>block overflow ellipsis</a> to fit on the line.
849+
(This can result in the entire contents of the line box being replaced.)
850+
For this purpose, <a>soft wrap opportunities</a> added by 'overflow-wrap' are ignored.
851+
Text <a href="https://www.w3.org/TR/css-text-3/#justification">alignment and justification</a>
852+
occurs after placement,
853+
and measures the inserted <a>block overflow ellipsis</a>
854+
together with the rest of the line’s content.
855+
856+
If there is no next <a>fragmentation container</a>
857+
and thus the remainder of the content after the break would be discarded,
858+
then the UA may visually replace the contents of the line,
859+
as it does for 'text-overflow'.
860+
If, however, there is a next <a>fragmentation container</a>
861+
that would receive subsequent content,
862+
then the content replaced by the <a>block overflow ellipsis</a>
863+
must be pushed to the next <a>fragmentation container</a>
864+
and the <a>block overflow ellipsis</a> inserted and laid out
865+
exactly as if it were part of the <a>in-flow</a> contents of the line.
866+
This can result in changes to layout within or impacted by the line.
867+
The means of breaking any resulting cycles is up to the UA.
868+
869+
If the <a>block overflow ellipsis</a>
870+
is too long to fit in the line,
871+
the result is undefined.
872+
(The UA may, for example, treat the <a>block overflow ellipsis</a> as an unbreakable string,
873+
or it may lay out the string across more than one line,
874+
replacing content in earlier lines as well.)
875+
876+
The <a>block overflow ellipsis</a> does not capture events:
877+
pointer events are dispatched to whatever is underneath
878+
or otherwise visually replaced by it.
879+
880+
It also has no effect on the intrinsic size of the box:
881+
its <a lt="min-content size">min-content</a> and <a lt="max-content size">max-content</a> sizes
882+
are calculated exactly as if 'block-overflow' were ''block-overflow/clip''.
883+
884+
Note: Future specifications may extend this feature,
885+
for example by providing an ''::ellipsis'' pseudo-element
886+
to style the text,
887+
or by allowing the selection of a child element of the block
888+
to use as either an inline-level or block-level indicator
889+
(in which case, it can capture events).
890+
891+
892+
<h2 id=fragmentation>
893+
Fragmenting Overflow</h2>
894+
895+
<h3 id=line-clamp>
896+
Limiting Visible Lines: the 'line-clamp' shorthand property</h3>
784897

785898
<pre class=propdef>
786899
Name: line-clamp
@@ -796,6 +909,14 @@ Limiting Visible Lines: the 'line-clamp' shorthand property</h2>
796909
The 'line-clamp' property is a <a>shorthand</a>
797910
for the 'max-lines', 'block-overflow', and 'continue' properties.
798911

912+
Issue: For the time being,
913+
experiemental implementations are encouraged
914+
to follow the full behavior defined by this shorthand and its longhands,
915+
but to only expose the shorthand to authors.
916+
This is in order to facilitate further tweaking,
917+
and in particular potential renaming,
918+
of the longhand properties and their values.
919+
799920
It allows limiting the contents of a block container
800921
to the specified number of lines;
801922
remaining content is fragmented away
@@ -822,14 +943,6 @@ Limiting Visible Lines: the 'line-clamp' shorthand property</h2>
822943
See the corresponding longhand properties for details
823944
about how this mechanism operates.
824945

825-
Issue: For the time being,
826-
experiemental implementations are encouraged
827-
to follow the full behavior defined by this shorthand and its longhands,
828-
but to only expose the shorthand to authors.
829-
This is in order to facilitate further tweaking,
830-
and in particular potential renaming,
831-
of the longhand properties and their values.
832-
833946
<div class="example">
834947
In this example, the lead paragraph of each article
835948
is listed in a shortened menu,
@@ -875,8 +988,8 @@ Limiting Visible Lines: the 'line-clamp' shorthand property</h2>
875988
Something more complicated might be needed.
876989

877990

878-
<h2 id="max-lines">
879-
Forcing a break after a set number of lines: the 'max-lines' property</h2>
991+
<h3 id="max-lines">
992+
Forcing a break after a set number of lines: the 'max-lines' property</h3>
880993

881994
<pre class=propdef>
882995
Name: max-lines
@@ -931,8 +1044,8 @@ Forcing a break after a set number of lines: the 'max-lines' property</h2>
9311044
* classify these fragmentation containers as "category3" (i.e. not pages nor multicol) for the purpose of forced breaks.
9321045
</div>
9331046

934-
<h2 id="fragmentation">
935-
Fragmentation of overflow: the 'continue' property</h2>
1047+
<h3 id="continue">
1048+
Fragmentation of overflow: the 'continue' property</h3>
9361049

9371050
<pre class=propdef>
9381051
Name: continue
@@ -1056,111 +1169,6 @@ Once it is sufficiently stable in this specification,
10561169
</figure>
10571170
</div>
10581171

1059-
<h2 id="block-ellipsis">
1060-
Indicating Block-Axis Overflow: the 'block-overflow' property</h2>
1061-
1062-
<pre class=propdef>
1063-
Name: block-overflow
1064-
Value: clip | ellipsis | <<string>>
1065-
Initial: clip
1066-
Applies to: [=block containers=]
1067-
Inherited: yes
1068-
Percentages: N/A
1069-
Computed value: specified value
1070-
</pre>
1071-
1072-
This property allows inserting content into the last line box
1073-
before a (forced <em>or</em> unforced) <a>region break</a>
1074-
to indicate the continuity of truncated/interrupted content.
1075-
It only affects line boxes contained directly by the <a>block container</a> itself,
1076-
but as it inherits, will have an effect on descendants’ line boxes unless overridden.
1077-
If the box contains no line box immediately preceding a <a>region break</a>,
1078-
then this property has no effect.
1079-
1080-
ISSUE: Should this apply to other types of fragmentation breaks (e.g. pages, columns)?
1081-
1082-
The inserted content is called the <dfn>block overflow ellipsis</dfn>.
1083-
Values have the following meanings:
1084-
1085-
<dl dfn-for="block-overflow" dfn-type=value>
1086-
<dt><dfn>clip</dfn>
1087-
<dd>
1088-
The rendering is unaffected.
1089-
1090-
<dt><dfn>ellipsis</dfn>
1091-
<dd>
1092-
Render an ellipsis character (U+2026)--
1093-
or a more typographically-appropriate equivalent--
1094-
as the <a>block overflow ellipsis</a>
1095-
at the end of the affected line box.
1096-
UAs should use the conventions of the
1097-
<a>content language</a>,
1098-
writing system, and
1099-
<a>writing mode</a>
1100-
to determine the most appropriate ellipsis string.
1101-
1102-
<dt><dfn><<string>></dfn>
1103-
<dd>
1104-
Render the specified string
1105-
as the <a>block overflow ellipsis</a>
1106-
at the end of the affected line box.
1107-
The UA may truncate this string if it is absurdly long.
1108-
</dl>
1109-
1110-
When 'block-overflow' is not ''block-overflow/clip'',
1111-
the <a>block overflow ellipsis</a> string
1112-
is wrapped in an anonymous inline
1113-
and placed at the end of the line box
1114-
as a direct child of the <a>block container</a>’s <a>root inline box</a>,
1115-
reducing the space in the line box
1116-
available to the other contents of the line.
1117-
This inline is assigned ''unicode-bidi: plaintext''
1118-
and is placed in the line box after the last
1119-
<a>soft wrap opportunity</a> [[!CSS-TEXT-3]]
1120-
that would still allow the entire <a>block overflow ellipsis</a> to fit on the line.
1121-
(This can result in the entire contents of the line box being replaced.)
1122-
For this purpose, <a>soft wrap opportunities</a> added by 'overflow-wrap' are ignored.
1123-
Text <a href="https://www.w3.org/TR/css-text-3/#justification">alignment and justification</a>
1124-
occurs after placement,
1125-
and measures the inserted <a>block overflow ellipsis</a>
1126-
together with the rest of the line’s content.
1127-
1128-
If there is no next <a>fragmentation container</a>
1129-
and thus the remainder of the content after the break would be discarded,
1130-
then the UA may visually replace the contents of the line,
1131-
as it does for 'text-overflow'.
1132-
If, however, there is a next <a>fragmentation container</a>
1133-
that would receive subsequent content,
1134-
then the content replaced by the <a>block overflow ellipsis</a>
1135-
must be pushed to the next <a>fragmentation container</a>
1136-
and the <a>block overflow ellipsis</a> inserted and laid out
1137-
exactly as if it were part of the <a>in-flow</a> contents of the line.
1138-
This can result in changes to layout within or impacted by the line.
1139-
The means of breaking any resulting cycles is up to the UA.
1140-
1141-
If the <a>block overflow ellipsis</a>
1142-
is too long to fit in the line,
1143-
the result is undefined.
1144-
(The UA may, for example, treat the <a>block overflow ellipsis</a> as an unbreakable string,
1145-
or it may lay out the string across more than one line,
1146-
replacing content in earlier lines as well.)
1147-
1148-
The <a>block overflow ellipsis</a> does not capture events:
1149-
pointer events are dispatched to whatever is underneath
1150-
or otherwise visually replaced by it.
1151-
1152-
It also has no effect on the intrinsic size of the box:
1153-
its <a lt="min-content size">min-content</a> and <a lt="max-content size">max-content</a> sizes
1154-
are calculated exactly as if 'block-overflow' were ''block-overflow/clip''.
1155-
1156-
Note: Future specifications may extend this feature,
1157-
for example by providing an ''::ellipsis'' pseudo-element
1158-
to style the text,
1159-
or by allowing the selection of a child element of the block
1160-
to use as either an inline-level or block-level indicator
1161-
(in which case, it can capture events).
1162-
1163-
11641172

11651173
Privacy and Security Considerations {#priv-sec}
11661174
===============================================

0 commit comments

Comments
 (0)