Skip to content

Commit 5f117af

Browse files
committed
[css-contain-1] Editorial Rephrase containment exceptions into a list, and move to bottom of each section.
Ports an editorial change already made to L2 & L3. See c3c7393
1 parent f31e4c8 commit 5f117af

File tree

1 file changed

+73
-55
lines changed

1 file changed

+73
-55
lines changed

css-contain-1/Overview.bs

+73-55
Original file line numberDiff line numberDiff line change
@@ -534,49 +534,7 @@ Types of Containment</h2>
534534
<h3 id='containment-size'>
535535
Size Containment</h3>
536536

537-
If the element does not generate a <a>principal box</a> (as is the case with ''display: contents'' or ''display: none''),
538-
or its [=inner display type=] is ''display/table'',
539-
or its principal box is an <a spec="css-display-3">internal table box</a>,
540-
or an <a spec="css-display-3">internal ruby box</a>,
541-
or a <a spec="css-display-3" lt="atomic inline">non-atomic</a> <a spec="css-display-3">inline-level</a> box,
542-
size containment has no effect.
543-
544-
<wpt>
545-
contain-size-001.html
546-
contain-size-002.html
547-
contain-size-003.html
548-
contain-size-004.html
549-
contain-size-005.html
550-
contain-size-006.html
551-
contain-size-007.html
552-
contain-size-008.html
553-
contain-size-009.html
554-
contain-size-010.html
555-
contain-size-012.html
556-
contain-size-012b.html
557-
contain-size-051.html
558-
contain-size-052.html
559-
</wpt>
560-
561-
Note: Internal table boxes,
562-
which do not include table captions,
563-
are excluded,
564-
because the table layout algorithm
565-
does not allow boxes to become smaller than their inflow content.
566-
Sizing a table cell as if it was empty and then laying out its content inside without changing the size
567-
is effectively an undefined operation.
568-
Manually setting the 'width' or 'height' properties to ''0''
569-
cannot make it smaller than its content.
570-
This concern does not apply to table captions,
571-
which are perfectly capable of having a fixed size
572-
that is independent of their content.
573-
574-
<wpt>
575-
contain-size-011.html
576-
contain-size-056.html
577-
</wpt>
578-
579-
Otherwise, giving an element <dfn export>size containment</dfn>
537+
Giving an element <dfn export>size containment</dfn>
580538
makes its [=principal box=] a <dfn>size containment box</dfn>
581539
and has the following effects:
582540

@@ -864,6 +822,52 @@ Size Containment</h3>
864822
and its [=natural height=] is treated as 0.
865823
</div>
866824

825+
However, giving an element [=size containment=]
826+
has no effect if any of the following are true:
827+
828+
* if the element does not generate a <a>principal box</a>
829+
(as is the case with ''display: contents'' or ''display: none'')
830+
* if its [=inner display type=] is ''display/table''
831+
* if its [=principal box=] is
832+
an <a spec="css-display-3">internal table box</a>
833+
* if its [=principal box=] is
834+
an <a spec="css-display-3">internal ruby box</a>
835+
or a <a spec="css-display-3" lt="atomic inline">non-atomic</a> <a spec="css-display-3">inline-level</a> box
836+
837+
<wpt>
838+
contain-size-001.html
839+
contain-size-002.html
840+
contain-size-003.html
841+
contain-size-004.html
842+
contain-size-005.html
843+
contain-size-006.html
844+
contain-size-007.html
845+
contain-size-008.html
846+
contain-size-009.html
847+
contain-size-010.html
848+
contain-size-012.html
849+
contain-size-012b.html
850+
contain-size-051.html
851+
contain-size-052.html
852+
</wpt>
853+
854+
Note: Internal table boxes,
855+
which do not include table captions,
856+
are excluded,
857+
because the table layout algorithm
858+
does not allow boxes to become smaller than their inflow content.
859+
Sizing a table cell as if it was empty and then laying out its content inside without changing the size
860+
is effectively an undefined operation.
861+
Manually setting the 'width' or 'height' properties to ''0''
862+
cannot make it smaller than its content.
863+
This concern does not apply to table captions,
864+
which are perfectly capable of having a fixed size
865+
that is independent of their content.
866+
867+
<wpt>
868+
contain-size-011.html
869+
contain-size-056.html
870+
</wpt>
867871

868872
<h4 id='containment-size-opt' class="no-toc">
869873
Possible Size-Containment Optimizations</h4>
@@ -895,12 +899,7 @@ Possible Size-Containment Optimizations</h4>
895899
<h3 id='containment-layout'>
896900
Layout Containment</h3>
897901

898-
If the element does not generate a <a>principal box</a> (as is the case with 'display' values of ''display/contents'' or ''display/none''),
899-
or its [=principal box=] is an <a spec="css-display-3">internal table box</a> other than ''display/table-cell'',
900-
or an <a spec="css-display-3">internal ruby box</a>,
901-
or a <a spec="css-display-3" lt="atomic inline">non-atomic</a> <a spec="css-display-3">inline-level</a> box,
902-
layout containment has no effect.
903-
Otherwise, giving an element <dfn export>layout containment</dfn>
902+
Giving an element <dfn export>layout containment</dfn>
904903
makes its [=principal box=] a <dfn>layout containment box</dfn>
905904
and has the following effects:
906905

@@ -1050,6 +1049,18 @@ Layout Containment</h3>
10501049
contain-layout-baseline-005.html
10511050
</wpt>
10521051

1052+
However, giving an element [=layout containment=]
1053+
has no effect if any of the following are true:
1054+
1055+
* if the element does not generate a <a>principal box</a>
1056+
(as is the case with ''display: contents'' or ''display: none'')
1057+
* if its [=principal box=] is
1058+
an <a spec="css-display-3">internal table box</a>
1059+
other than ''display/table-cell''
1060+
* if its [=principal box=] is
1061+
an <a spec="css-display-3">internal ruby box</a>
1062+
or a <a spec="css-display-3" lt="atomic inline">non-atomic</a> <a spec="css-display-3">inline-level</a> box
1063+
10531064
<h4 id='containment-layout-opt' class="no-toc">
10541065
Possible Layout-Containment Optimizations</h4>
10551066

@@ -1075,12 +1086,7 @@ Possible Layout-Containment Optimizations</h4>
10751086
<h3 id='containment-paint'>
10761087
Paint Containment</h3>
10771088

1078-
If the element does not generate a <a>principal box</a> (as is the case with 'display' values of ''display/contents'' or ''display/none''),
1079-
or its [=principal box=] is an <a spec="css-display-3">internal table box</a> other than ''display/table-cell'',
1080-
or an <a spec="css-display-3">internal ruby box</a>,
1081-
or a <a spec="css-display-3" lt="atomic inline">non-atomic</a> <a spec="css-display-3">inline-level</a> box,
1082-
paint containment has no effect.
1083-
Otherwise, giving an element <dfn export>paint containment</dfn>
1089+
Giving an element <dfn export>paint containment</dfn>
10841090
makes its [=principal box=] a <dfn>paint containment box</dfn>
10851091
and has the following effects:
10861092

@@ -1171,6 +1177,18 @@ Paint Containment</h3>
11711177
contain-paint-baseline-001.html
11721178
</wpt>
11731179

1180+
However, giving an element [=paint containment=]
1181+
has no effect if any of the following are true:
1182+
1183+
* if the element does not generate a <a>principal box</a>
1184+
(as is the case with ''display: contents'' or ''display: none'')
1185+
* if its [=principal box=] is
1186+
an <a spec="css-display-3">internal table box</a>
1187+
other than ''display/table-cell''
1188+
* if its [=principal box=] is
1189+
an <a spec="css-display-3">internal ruby box</a>
1190+
or a <a spec="css-display-3" lt="atomic inline">non-atomic</a> <a spec="css-display-3">inline-level</a> box
1191+
11741192
<h4 id='containment-paint-opt' class="no-toc">
11751193
Possible Paint-Containment Optimizations</h4>
11761194

0 commit comments

Comments
 (0)