diff --git a/css-contain-1/Overview.bs b/css-contain-1/Overview.bs index 4055f654c22..821ce6c86de 100644 --- a/css-contain-1/Overview.bs +++ b/css-contain-1/Overview.bs @@ -236,26 +236,68 @@ Layout Containment 1. The element [=establishes an independent formatting context=]. - 2. If a fragmentation context participates in layout containment, - the first element with layout containment - affecting the fragmentation context - must “trap” the remainder of the fragmented flow. - Fragmentation must not continue past the layout containment boundary, - and the last fragmentation container - within the first layout containment boundary - is treated as if it is the last fragmentation container - in its fragmentation context. - - If subsequent fragmentation containers in the fragmentation context - are only generated when more content remains in the fragmented flow, + 2. If at least one [=fragmentation container=] of a [=fragmentation context=] has [=layout containment=], + or if at least one [=fragmentation container=] of a [=fragmentation context=] is a descendant of an element with layout containment + and at least one subsequent [=fragmentation container=] of the same [=fragmentation context=] + is not a descendant of that same element with layout containment, + then the first element with [=layout containment=] + which is either a [=fragmentation container=] itself + or is an ancestor of a [=fragmentation container=] + must “trap” the remainder of the [=fragmented flow=]: + [=fragmentation=] must not continue past the [=layout containment=] boundary, + and the last [=fragmentation container=] + within the first [=layout containment=] boundary + is treated as if it is the last [=fragmentation container=] + in its [=fragmentation context=]. + + If subsequent [=fragmentation containers=] in the [=fragmentation context=] + are only generated when more content remains in the [=fragmented flow=], then they are not generated. If they would exist regardless, - they remain part of the fragmentation context, - but do not receive any content from the fragmented flow. - - Note: [[CSS-REGIONS-1]] has details over how layout containment affects + they remain part of the [=fragmentation context=], + but do not receive any content from the [=fragmented flow=]. + + Note: At the time of writing, no stable specification is affected by this point. + Only specifications that would enable some (but not all) fragmentation containers of a fragmentation context + to be layout-contained (or descendants of a layout contained element) + are concerned. + This is not the case of [[CSS-PAGE-3]] nor of [[CSS-MULTICOL-1]]. + This requirement is nonetheless included because + several mechanisms that would make this a possibility have been considered + (e.g.: [[CSS-REGIONS-1]], ''::nth-fragment()'', a hypothetical selector for individual columns of a multicol…), + and the guarantees that layout containment is intended to offer would not be realized + if such mechanisms did not abide by this rule. + [[CSS-REGIONS-1]] has details over how layout containment affects regions. +
+

+				<article>Lorem ipsum…</article>
+				<div id=a></div>
+				<aside>
+				  <div id=b></div>
+				  <div id=c></div>
+				</aside>
+				<aside>
+				  <div id=d></div>
+				  <div id=e></div>
+				</aside>
+				<div id=f></div>
+			
+

+				article {flow-into: foo;}
+				#a, #b, #c, #d, #e, #f {flow-from: foo;}
+				aside {contain: layout}
+			
+ + In this [[CSS-REGIONS-1]] example, + content can flow from #a to #b, + from #b to #c. + However as #c is the last fragment container in the first layout-contained element, + it traps all the remaining content, + and nothing gets flowed into #d, #e, or #f. +
+ 3. If the contents of the element overflow the element, they must be treated as ink overflow. diff --git a/css-contain-1/issues-2018-cr.html b/css-contain-1/issues-2018-cr.html index d824c996886..4c5479f62cf 100644 --- a/css-contain-1/issues-2018-cr.html +++ b/css-contain-1/issues-2018-cr.html @@ -66,6 +66,14 @@

CSS Contain Level 1 Disposition of Comments for 2018-05-24 CR

Response: https://github.com/w3c/csswg-drafts/issues/2845#issuecomment-401319909 Closed: Accepted Resolved: Editorial +
+Issue 5. #
+Summary:  Need clarification on layout containment & fragmentation
+From:     Daniel Holbert
+Comment:  https://github.com/w3c/csswg-drafts/issues/2840
+Response: https://github.com/w3c/csswg-drafts/issues/2840#issuecomment-401249631
+Closed:   Accepted
+Resolved: Editorial