Skip to content

Commit d9b1079

Browse files
committed
[css-contain] iteration between containment and baseline alignment
Closes w3c#2995
1 parent 04ebea5 commit d9b1079

3 files changed

Lines changed: 30 additions & 2 deletions

File tree

css-contain-1/Overview.bs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ Size Containment</h3>
188188
size containment has no effect.
189189
Otherwise, giving an element <dfn export>size containment</dfn> has the following effects:
190190

191-
1. When laying out the containing element,
191+
1. When calculating the size of the containing element,
192192
it must be treated as having no contents.
193193

194194
Note: Even when the element's [=sizing properties=] are ''height/auto''
@@ -197,9 +197,12 @@ Size Containment</h3>
197197
such as the 'columns' property or the 'grid' property,
198198
continue to be taken into account.
199199

200-
After layout of the element is complete,
200+
Then,
201201
its contents must then be laid out into the containing element's resolved size.
202202

203+
Note: [=size containment=] does not suppress baseline alignment.
204+
See [=layout containment=] for that.
205+
203206
<a>Replaced elements</a> must be treated as having an intrinsic width and height of 0.
204207
2. Elements with <a>size containment</a> are <a spec=css-break-3>monolithic</a> (See [[CSS-BREAK-3#possible-breaks]]).
205208

@@ -312,6 +315,12 @@ Layout Containment</h3>
312315
Note: This introduces the previously non-existent possibility that [=forced breaks=]
313316
may occur between a box and its container (See [[CSS-BREAK-3#possible-breaks]]).
314317

318+
7. For the purpose of the 'vertical-align' property,
319+
or any other property whose effects
320+
need to relate the position of the containing element's baseline
321+
to something other than its descendants,
322+
the containing element is treated as having no baseline.
323+
315324
Possible optimizations that can be enabled by <a>layout containment</a> include (but are not limited to):
316325

317326
1. When laying out the page,
@@ -516,6 +525,7 @@ This appendix is <em>informative</em>.
516525
<h3 id="2018-05-24-changes">Changes from the
517526
<a href="https://www.w3.org/TR/2018/CR-css-contain-1-20180524/">Candidate Recommendation of 24 May 2018</a></h3>
518527

528+
* Layout containment suppresses baseline alignement, but size containment does not
519529
* Layout containment causes the element to establish a new stacking context
520530
* Size containment does not apply to tables
521531
* Clarify that the columns and grid properties affect the size of size-contained elements

css-contain-1/issues-2018-cr.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,15 @@ <h1>CSS Contain Level 1 Disposition of Comments for 2018-05-24 CR</h1>
9292
Response: <a href='https://github.com/w3c/csswg-drafts/issues/2942#issuecomment-408244344'>https://github.com/w3c/csswg-drafts/issues/2942#issuecomment-408244344</a>
9393
Closed: Accepted
9494
Resolved: <a href='https://github.com/w3c/csswg-drafts/issues/2942#issuecomment-409762755'>https://github.com/w3c/csswg-drafts/issues/2942#issuecomment-409762755</a></pre>
95+
<pre class='a' id='issue-8'>
96+
Issue 8. <a href='#issue-8'>#</a>
97+
Summary: containment vs baseline alignement
98+
From: Florian Rivoal
99+
Comment: <a href='https://github.com/w3c/csswg-drafts/issues/2995'>https://github.com/w3c/csswg-drafts/issues/2995</a>
100+
Comment: <a href='https://github.com/w3c/csswg-drafts/issues/2995#issuecomment-411126837'>https://github.com/w3c/csswg-drafts/issues/2995#issuecomment-411126837</a>
101+
Response: <a href='https://github.com/w3c/csswg-drafts/issues/2995#issuecomment-411371226'>https://github.com/w3c/csswg-drafts/issues/2995#issuecomment-411371226</a>
102+
Closed: Accepted
103+
Resolved: <a href='https://github.com/w3c/csswg-drafts/issues/2995#issuecomment-415094473'>https://github.com/w3c/csswg-drafts/issues/2995#issuecomment-415094473</a></pre>
95104
<script>
96105
(function () {
97106
var sheet = document.styleSheets[0];

css-contain-1/issues-2018-cr.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,12 @@ Response: https://github.com/w3c/csswg-drafts/issues/2942#issuecomment-407956323
6262
Response: https://github.com/w3c/csswg-drafts/issues/2942#issuecomment-408244344
6363
Closed: Accepted
6464
Resolved: https://github.com/w3c/csswg-drafts/issues/2942#issuecomment-409762755
65+
----
66+
Issue 8.
67+
Summary: containment vs baseline alignement
68+
From: Florian Rivoal
69+
Comment: https://github.com/w3c/csswg-drafts/issues/2995
70+
Comment: https://github.com/w3c/csswg-drafts/issues/2995#issuecomment-411126837
71+
Response: https://github.com/w3c/csswg-drafts/issues/2995#issuecomment-411371226
72+
Closed: Accepted
73+
Resolved: https://github.com/w3c/csswg-drafts/issues/2995#issuecomment-415094473

0 commit comments

Comments
 (0)