Skip to content

Commit e5dda86

Browse files
committed
[css-contain][css-content] Clarify effects of style containement
The less mature spec (css-content) should be the one defining how it interacts with the more mature mechanism (css-contain). Moving existing descriptions from css-contain to css-content Also, 'break-inside' was implied by "the break-* properties", when only 'break-before' and 'break-after' were intended. This is part of #1872
1 parent 91748fb commit e5dda86

File tree

4 files changed

+43
-9
lines changed

4 files changed

+43
-9
lines changed

css-contain-1/Overview.bs

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,13 @@ Editor: Tab Atkins, Google, http://xanthir.com/contact/, w3cid 42199
1313
Editor: Florian Rivoal, On behalf of Bloomberg, https://florian.rivoal.net/, w3cid 43241
1414
Abstract: This CSS module describes the 'contain' property, which indicates that the element's subtree is independent of the rest of the page. This enables heavy optimizations by user agents when used well.
1515
Ignored Terms: scrollWidth, scrollHeight, clientWidth, clientHeight, formatting context
16-
Link Defaults: css-lists-3 (property) counter-increment, css-content-3 (property) string-set
16+
Link Defaults: css-lists-3 (property) counter-increment
17+
</pre>
18+
<pre class="anchors">
19+
spec: css2; urlPrefix: https://www.w3.org/TR/CSS2/
20+
type: property; url: generate.html#propdef-content; text: content
21+
type: value; for: content; url: generate.html#value-def-open-quote;; text: open-quote
1722
</pre>
18-
1923
<h2 id='intro'>
2024
Introduction</h2>
2125

@@ -150,6 +154,11 @@ Types of Containment</h2>
150154
and helps authors compose their page out of functional units,
151155
as it limits how widely an effect a given change can have on a document.
152156

157+
Advisement: Specification authors introducing new properties or mechanisms
158+
need to consider whether and how the various types of containment
159+
affect what they are introducing,
160+
and include in their specification any effect not described here.
161+
153162
<h3 id='containment-size'>
154163
Size Containment</h3>
155164

@@ -254,11 +263,10 @@ Style Containment</h3>
254263

255264
1. The following properties must have no effect on descendants of the element:
256265

257-
* 'break-*' (and the related aliases)
258-
* 'bookmark-*'
259-
* 'string-set'
266+
* 'break-before' and 'break-after' (and the related aliases)
260267

261-
2. The 'counter-increment', 'counter-set', 'flow-from', 'flow-into', and 'content' (for the purpose of ''content/open-quote''/etc values) properties must be <a>scoped</a> to the element's sub-tree.
268+
2. The 'counter-increment', 'counter-set', 'flow-from', 'flow-into', and <a property spec=css2>content</a> (for the purpose of ''content/open-quote''/etc values) properties
269+
must be <a>scoped</a> to the element's sub-tree.
262270

263271
A <dfn export local-lt="scoped">scoped property</dfn> has its effects scoped to a particular element or subtree.
264272
It must act as if the scoping element was the root of the document
@@ -399,7 +407,7 @@ Answers are provided below.
399407
<dd>No.
400408
</dl>
401409

402-
<h2 class="no-num" id="changes">Appendix A. Changes</h2>
410+
<h2 class="no-num non-normative" id="changes">Appendix A. Changes</h2>
403411

404412
This appendix is <em>informative</em>.
405413

@@ -410,6 +418,9 @@ This appendix is <em>informative</em>.
410418
<li>Move the definition of "Becoming a formatting context" back to this specification
411419
<li>Rename "Becoming a formatting context" to "Becoming a formatting context root".
412420
<li>Clarify to which box paint containment clips.
421+
<li>Move the interaction between containment and the <code>bookmark-*</code> and <code>string-set</code> properties to [[CSS-CONTENT-3]]
422+
<li>Explicitly expnd <code>break-*</code> to </code>break-before</code> and <code>break-after</code>
423+
to avoid implying that <code>break-inside</code> is affected by style containment.
413424
</ul>
414425

415426
<h3 id="2017-04-19-changes">Changes from the

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,18 @@ <h1>CSS Contain Level 1 Disposition of Comments for 2017-02-21 WD</h1>
6464
<pre class='a' id='issue-4'>
6565
Issue 4. <a href='#issue-4'>#</a>
6666
Summary: To which box does paint containment clip?
67-
From: Orio Brufau
67+
From: Oriol Brufau
6868
Comment: <a href='https://github.com/w3c/csswg-drafts/issues/1809'>https://github.com/w3c/csswg-drafts/issues/1809</a>
6969
Response: <a href='https://github.com/w3c/csswg-drafts/issues/1809#issuecomment-342333088'>https://github.com/w3c/csswg-drafts/issues/1809#issuecomment-342333088</a>
7070
Closed: Accepted
7171
Resolved: <a href='https://github.com/w3c/csswg-drafts/issues/1809#issuecomment-342333088'>https://github.com/w3c/csswg-drafts/issues/1809#issuecomment-342333088</a></pre>
72+
<pre class=' open' id='issue-5'>
73+
Issue 5. <a href='#issue-5'>#</a>
74+
Summary: Clarify effects of style containment
75+
From Oriol Brufau
76+
Comment: <a href='https://github.com/w3c/csswg-drafts/issues/1872'>https://github.com/w3c/csswg-drafts/issues/1872</a>
77+
Response: <a href='https://github.com/w3c/csswg-drafts/issues/1872#issuecomment-342334343'>https://github.com/w3c/csswg-drafts/issues/1872#issuecomment-342334343</a>
78+
Open</pre>
7279
<script>
7380
(function () {
7481
var sheet = document.styleSheets[0];

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,15 @@ Verified: https://github.com/w3c/csswg-drafts/issues/1791#issuecomment-331636396
3434
----
3535
Issue 4.
3636
Summary: To which box does paint containment clip?
37-
From: Orio Brufau
37+
From: Oriol Brufau
3838
Comment: https://github.com/w3c/csswg-drafts/issues/1809
3939
Response: https://github.com/w3c/csswg-drafts/issues/1809#issuecomment-342333088
4040
Closed: Accepted
4141
Resolved: https://github.com/w3c/csswg-drafts/issues/1809#issuecomment-342333088
42+
----
43+
Issue 5.
44+
Summary: Clarify effects of style containment
45+
From Oriol Brufau
46+
Comment: https://github.com/w3c/csswg-drafts/issues/1872
47+
Response: https://github.com/w3c/csswg-drafts/issues/1872#issuecomment-342334343
48+
Open

css-content-3/Overview.bs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -971,6 +971,8 @@ The string-set property</h4>
971971
</dl>
972972

973973
<!--end of insert from GCPM3 -->
974+
If an element has <a>style containment</a>,
975+
the 'string-set' property must have no effects on descendants of that element.
974976

975977

976978
<div class="example">
@@ -1169,6 +1171,10 @@ Bookmarks</h2>
11691171
exactly as if navigating to that element by fragment URL.
11701172
<span class="note">This will also trigger matching the '':target'' pseudo-class.</span>
11711173

1174+
If an element has <a>style containement</a>, the
1175+
'bookmark-level', 'bookmark-label', and 'bookmark-state' properties
1176+
must have no effect on descendants of the element.
1177+
11721178
<h3 id="bookmark-level">
11731179
bookmark-level
11741180
</h3>
@@ -1318,6 +1324,9 @@ bookmark-state</h3>
13181324

13191325
* Dave Cramer added as co-editor. Ian Hickson and Håkon Wium Lie are now former editors.
13201326

1327+
* Moved effects of style containement on properties of this specification from the css-contain specification to this one,
1328+
due to their respective maturity.
1329+
13211330
<h2 class="no-num" id="acknowledgements">Acknowledgements</h2>
13221331

13231332
Stuart Ballard,

0 commit comments

Comments
 (0)