You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. The element[=establishes an independent formatting context=].
567
+
1. The [=layout-containment/containing box=][=establishes an independent formatting context=].
564
568
565
569
<wpt>
566
570
contain-layout-ifc-022.html
@@ -570,10 +574,10 @@ Layout Containment</h3>
570
574
</wpt>
571
575
572
576
2. If at least one [=fragmentation container=] of a [=fragmentation context=] has [=layout containment=],
573
-
or if at least one [=fragmentation container=] of a [=fragmentation context=] is a descendant of an element with layout containment
577
+
or if at least one [=fragmentation container=] of a [=fragmentation context=] is a descendant of [=layout-containment/containing box=] for layout containment
574
578
<strong>and</strong> at least one subsequent [=fragmentation container=] of the same [=fragmentation context=]
575
579
is not a descendant of that same element with layout containment,
576
-
then the first element with[=layout containment=]
580
+
then the first [=layout-containment/containing box=] for[=layout containment=]
577
581
which is either a [=fragmentation container=] itself
578
582
or is an ancestor of a [=fragmentation container=]
579
583
must “trap” the remainder of the [=fragmented flow=]:
@@ -626,7 +630,7 @@ Layout Containment</h3>
626
630
In this [[CSS-REGIONS-1]] example,
627
631
content can flow from <code>#a</code> to <code>#b</code>,
628
632
from <code>#b</code> to <code>#c</code>.
629
-
However as <code>#c</code> is the last fragment container in the first layout-contained element,
633
+
However as <code>#c</code> is the last fragment container in the first containing box for layout containment,
630
634
it traps all the remaining content,
631
635
and nothing gets flowed into <code>#d</code>, <code>#e</code>, or <code>#f</code>.
632
636
</div>
@@ -646,7 +650,7 @@ Layout Containment</h3>
646
650
contain-layout-ink-overflow-020.html
647
651
</wpt>
648
652
649
-
4. The element acts as a containing block for absolutely positioned and fixed positioned descendants.
653
+
4. The [=layout-containment/containing box=] acts as a containing block for absolutely positioned and fixed positioned descendants.
650
654
651
655
<wpt>
652
656
contain-layout-006.html
@@ -655,15 +659,15 @@ Layout Containment</h3>
655
659
contain-layout-cell-002.html
656
660
</wpt>
657
661
658
-
5. The element creates a <a>stacking context</a>.
662
+
5. The [=layout-containment/containing box=] creates a <a>stacking context</a>.
659
663
660
664
<wpt>
661
665
contain-layout-016.html
662
666
contain-layout-017.html
663
667
contain-layout-018.html
664
668
</wpt>
665
669
666
-
6. [=Forced breaks=] are allowed within elements with[=layout containment=],
670
+
6. [=Forced breaks=] are allowed within [=layout-containment/containing boxes=] for[=layout containment=],
667
671
but do not propagate to the parent as otherwise described in [[CSS-BREAK-3#break-between]].
668
672
669
673
<wpt>
@@ -676,9 +680,9 @@ Layout Containment</h3>
676
680
677
681
7. For the purpose of the 'vertical-align' property,
678
682
or any other property whose effects
679
-
need to relate the position of the containing element's baseline
683
+
need to relate the position of the [=layout-containment/containing box=]'s baseline
680
684
to something other than its descendants,
681
-
the containing element is treated as having no baseline.
685
+
the [=layout-containment/containing box=] is treated as having no baseline.
682
686
683
687
<wpt>
684
688
contain-layout-baseline-001.html
@@ -694,16 +698,16 @@ Layout Containment</h3>
694
698
Possible optimizations that can be enabled by <a>layout containment</a> include (but are not limited to):
695
699
696
700
1. When laying out the page,
697
-
the contents of separate containing elements
701
+
the contents of separate containing boxes
698
702
can be laid out in parallel,
699
703
as they're guaranteed not to affect each other.
700
704
701
705
2. When laying out the page,
702
-
if the containing element is off-screen or obscured
703
-
and the layout of the visible parts of the screen do not depend on the size of the containing element
704
-
(for example, if the containing element is near the end of a block container,
706
+
if the containing box is off-screen or obscured
707
+
and the layout of the visible parts of the screen do not depend on the size of the containing box
708
+
(for example, if the containing box is near the end of a block container,
705
709
and you're viewing the beginning of the block container),
706
-
the layout of the containing elements' contents can be delayed or done at a lower priority.
710
+
the layout of the containing box' contents can be delayed or done at a lower priority.
707
711
708
712
(When paired with <a>size containment</a>,
709
713
this optimization can be applied more liberally.)
@@ -713,7 +717,8 @@ Style Containment</h3>
713
717
714
718
Note: Style Containment is at-risk.
715
719
716
-
Giving an element <dfn export>style containment</dfn> has the following effects:
720
+
Giving an element <dfn export>style containment</dfn>
721
+
and has the following effects:
717
722
718
723
1. The 'counter-increment' and 'counter-set' properties
719
724
must be <a for=property>scoped to the element's sub-tree</a>
@@ -804,19 +809,21 @@ Style Containment</h3>
804
809
805
810
Possible optimizations that can be enabled by <a>style containment</a> include (but are not limited to):
806
811
807
-
1. Whenever a property is changed on a descendant of the containing element,
812
+
1. Whenever a property is changed on a descendant of an element with [=style containment=],
808
813
calculating what part of the DOM tree is "dirtied" and might need to have its style recalculated
809
-
can stop at the containing element.
814
+
can stop at the containing box.
810
815
811
816
<h3 id='containment-paint'>
812
817
Paint Containment</h3>
813
818
814
819
If the element does not generate a <a>principal box</a> (as is the case with 'display' values of ''display/contents'' or ''display/none''),
815
-
or if the element is an <a spec="css-display-3">internal table element</a> other than ''display/table-cell'',
816
-
or if the element is an <a spec="css-display-3">internal ruby element</a>,
817
-
or if the element's <a>principal box</a> is a <a spec="css-display-3" lt="atomic inline">non-atomic</a><a spec="css-display-3">inline-level</a> box,
820
+
or its [=principal box=] is an <a spec="css-display-3">internal table box</a> other than ''display/table-cell'',
821
+
or an <a spec="css-display-3">internal ruby box</a>,
822
+
or a <a spec="css-display-3" lt="atomic inline">non-atomic</a><a spec="css-display-3">inline-level</a> box,
818
823
paint containment has no effect.
819
-
Otherwise, giving an element <dfn export>paint containment</dfn> has the following effects:
824
+
Otherwise, giving an element <dfn export>paint containment</dfn>
825
+
makes its [=principal box=] a <dfn for=paint-containment>containing box</dfn> for [=paint containment=]
826
+
and has the following effects:
820
827
821
828
<wpt>
822
829
contain-paint-002.html
@@ -837,7 +844,7 @@ Paint Containment</h3>
837
844
838
845
1. The contents of the element
839
846
including both the paint of the descendants and their geometry
840
-
must be clipped to the <a>padding edge</a> of the element's <a>principal box</a>,
847
+
must be clipped to the <a>padding edge</a> of the [=paint-containment/containing box=],
841
848
taking <a>corner clipping</a> into account.
842
849
This does not include the creation of any mechanism
843
850
to access or indicate the presence of the clipped content;
@@ -864,7 +871,7 @@ Paint Containment</h3>
864
871
contain-paint-table-001.html
865
872
contain-paint-table-002.html
866
873
</wpt>
867
-
2. The element acts as a containing block for absolutely positioned and fixed positioned descendants.
874
+
2. The [=paint-containment/containing box=] acts as a containing block for absolutely positioned and fixed positioned descendants.
868
875
869
876
<wpt>
870
877
contain-paint-009.html
@@ -873,15 +880,15 @@ Paint Containment</h3>
873
880
contain-paint-023.html
874
881
contain-paint-024.html
875
882
</wpt>
876
-
3. The element creates a <a>stacking context</a>.
883
+
3. The [=paint-containment/containing box=] creates a <a>stacking context</a>.
877
884
878
885
<wpt>
879
886
contain-paint-020.html
880
887
contain-paint-021.html
881
888
contain-paint-025.html
882
889
contain-subgrid-001.html
883
890
</wpt>
884
-
4. The element[=establishes an independent formatting context=].
891
+
4. The [=paint-containment/containing box=][=establishes an independent formatting context=].
885
892
886
893
<wpt>
887
894
contain-paint-ifc-011.html
@@ -896,13 +903,13 @@ Paint Containment</h3>
896
903
<div class=informative>
897
904
Possible optimizations that can be enabled by <a>paint containment</a> include (but are not limited to):
898
905
899
-
1. If the containing element is off-screen or obscured,
906
+
1. If the containing box is off-screen or obscured,
900
907
the UA can directly skip trying to paint its contents,
901
908
as they're guaranteed to be off-screen/obscured as well.
902
909
903
910
2. Unless the clipped content is made accessible via a separate mechanism
904
911
such as the 'overflow', 'resize', or 'text-overflow' properties,
905
-
the UA can reserve "canvas" space for the element exactly the element's size.
912
+
the UA can reserve "canvas" space for the box exactly the box's size.
906
913
(In similar, scrollable, situations, like ''overflow: hidden'',
907
914
it's possible to scroll to the currently-clipped content,
0 commit comments