Skip to content

Commit c60bf0f

Browse files
committed
[css-contain] Clarify definitions of scoped properties
Closes w3c#2845
1 parent 6396654 commit c60bf0f

File tree

3 files changed

+35
-13
lines changed

3 files changed

+35
-13
lines changed

css-contain-1/Overview.bs

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -290,12 +290,12 @@ Style Containment</h3>
290290
Giving an element <dfn export>style containment</dfn> has the following effects:
291291

292292
1. The 'counter-increment' and 'counter-set' properties
293-
must be <a for=property>scoped</a> to the element's sub-tree
293+
must be <a for=property>scoped to the element's sub-tree</a>
294294
and create a new counter.
295295

296296
2. The effects of the 'content' property's
297297
''content/open-quote'', ''content/close-quote'', ''content/no-open-quote'' and ''content/no-close-quote''
298-
must be <a for=property>scoped</a> to the element's sub-tree.
298+
must be <a for=property>scoped to the element's sub-tree</a>.
299299

300300
Note: This implies that the depth of quote nesting in the subtree
301301
is unchanged and starts at the value that its context normally implies,
@@ -305,17 +305,22 @@ Style Containment</h3>
305305
Note: [[CSS-REGIONS-1]] has normative requirements on how <a>style containment</a> affects regions.
306306

307307
A <dfn export for=property lt="scoped | scoped property | scoped properties">scoped property</dfn> has its effects scoped to a particular element or subtree.
308-
If scoped to an element,
309-
it must act as if the scoping element was the root of the document
310-
for the purpose of evaluating the property's effects:
311-
any uses of the property outside the scoping element must have no effect on the uses of the property on or in the scoping element,
312-
and vice versa.
313-
If scoped to a sub-tree, it's the same,
314-
except the scoping element itself is counted as "outside" the tree,
315-
like the rest of the document,
316-
and the effects of the property on that element are unaffected by scoping.
317-
When considering the effects of the scoped property on elements <em>inside</em> the subtree,
318-
the element at the base of the subtree is treated as if it was the root of the document.
308+
309+
* If <dfn export for=property lt="scoped to an element | scoped to the element">scoped to an element</dfn>,
310+
it must act as if the scoping element was the root of the document
311+
for the purpose of evaluating the property's effects:
312+
any uses of the property outside the scoping element must have no effect on the uses of the property on or in the scoping element,
313+
and vice versa.
314+
315+
Note: “Scoping to an element” is currently unused.
316+
It is defined as an exention point for future specifications to use.
317+
318+
* If <dfn export for=property lt="scoped to a sub-tree | scoped to the sub-tree | scoped to the element's sub-tree | scoped to an element's sub-tree">scoped to a sub-tree</dfn>, it's the same,
319+
except the scoping element itself is counted as "outside" the tree,
320+
like the rest of the document,
321+
and the effects of the property on that element are unaffected by scoping.
322+
When considering the effects of the scoped property on elements <em>inside</em> the subtree,
323+
the element at the base of the subtree is treated as if it was the root of the document.
319324

320325
<div class=example>
321326
As 'counter-increment' is scoped to an element's subtree,
@@ -469,6 +474,7 @@ This appendix is <em>informative</em>.
469474
* Size containment does not apply to tables
470475
* Clarify that the columns and grid properties affect the size of size-contained elements
471476
* Change the animation type of the contain property from discrete to not animatable
477+
* Editorial improvements
472478

473479
<h3 id="2017-08-08-changes">Changes from the
474480
<a href="https://www.w3.org/TR/2017/CR-css-contain-1-20170808/">Candidate Recommendation of 8 August 2017</a></h3>

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,14 @@ <h1>CSS Contain Level 1 Disposition of Comments for 2018-05-24 CR</h1>
5858
Response: <a href='https://github.com/w3c/csswg-drafts/issues/2737#issuecomment-402574750'>https://github.com/w3c/csswg-drafts/issues/2737#issuecomment-402574750</a>
5959
Closed: Accepted
6060
Resolved: <a href='https://github.com/w3c/csswg-drafts/issues/2737#issuecomment-402574750'>https://github.com/w3c/csswg-drafts/issues/2737#issuecomment-402574750</a></pre>
61+
<pre class='a' id='issue-4'>
62+
Issue 4. <a href='#issue-4'>#</a>
63+
Summary: "scoped to an element" definition unused or unclear
64+
From: Daniel Holbert
65+
Comment: <a href='https://github.com/w3c/csswg-drafts/issues/2845'>https://github.com/w3c/csswg-drafts/issues/2845</a>
66+
Response: <a href='https://github.com/w3c/csswg-drafts/issues/2845#issuecomment-401319909'>https://github.com/w3c/csswg-drafts/issues/2845#issuecomment-401319909</a>
67+
Closed: Accepted
68+
Resolved: Editorial</pre>
6169
<script>
6270
(function () {
6371
var sheet = document.styleSheets[0];

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,11 @@ Comment: https://github.com/w3c/csswg-drafts/issues/2737
2828
Response: https://github.com/w3c/csswg-drafts/issues/2737#issuecomment-402574750
2929
Closed: Accepted
3030
Resolved: https://github.com/w3c/csswg-drafts/issues/2737#issuecomment-402574750
31+
----
32+
Issue 4.
33+
Summary: "scoped to an element" definition unused or unclear
34+
From: Daniel Holbert
35+
Comment: https://github.com/w3c/csswg-drafts/issues/2845
36+
Response: https://github.com/w3c/csswg-drafts/issues/2845#issuecomment-401319909
37+
Closed: Accepted
38+
Resolved: Editorial

0 commit comments

Comments
 (0)