Skip to content

Commit 687c2ff

Browse files
committed
[css-contain] Define interaction of contain and SVG
Closes #2987
1 parent 7cc5056 commit 687c2ff

3 files changed

Lines changed: 32 additions & 1 deletion

File tree

css-contain-1/Overview.bs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Strong Containment: the 'contain' property</h2>
6060
Value: none | strict | content | [ size || layout || style || paint ]
6161
Initial: none
6262
Inherited: no
63-
Applies to: all elements
63+
Applies to: See <a href="#contain-applies">below<a/>
6464
Computed value: specified keyword(s)
6565
Animation type: not animatable
6666
</pre>
@@ -129,6 +129,12 @@ Strong Containment: the 'contain' property</h2>
129129
its descendants are also guaranteed to be not visible.
130130
</dl>
131131

132+
<span id="contain-applies">This property generally applies to all elements (including [[css-pseudo-4#generated-content]])</span>,
133+
although some types of containment have no effect on some elements,
134+
as detailed in [[#containment-types]].
135+
In addition, in the case of [[SVG11]],
136+
the 'contain' property only applies to <{svg}> elements that have an associated CSS layout box.
137+
132138
<div class='example'>
133139
'contain' is useful when used widely on a page,
134140
particularly when a page contains a lot of "widgets" which are all independent.
@@ -545,6 +551,7 @@ This appendix is <em>informative</em>.
545551
* Size containment does not apply to tables
546552
* Clarify that the columns and grid properties affect the size of size-contained elements
547553
* Change the animation type of the contain property from discrete to not animatable
554+
* Define the effect of containment on SVG elements
548555
* Editorial improvements
549556

550557
<h3 id="2017-08-08-changes">Changes from the

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,18 @@ <h1>CSS Contain Level 1 Disposition of Comments for 2018-05-24 CR</h1>
118118
Closed: Rejected
119119
Resolved: <a href='https://github.com/w3c/csswg-drafts/issues/2952#issuecomment-417018325'>https://github.com/w3c/csswg-drafts/issues/2952#issuecomment-417018325</a>
120120
Verified: <a href='https://github.com/w3c/csswg-drafts/issues/2952#issuecomment-417018325'>https://github.com/w3c/csswg-drafts/issues/2952#issuecomment-417018325</a></pre>
121+
<pre class='a' id='issue-11'>
122+
Issue 11. <a href='#issue-11'>#</a>
123+
Summary: containment probably shouldn't apply to most SVG elements
124+
From: David Baron
125+
Comment: <a href='https://github.com/w3c/csswg-drafts/issues/2987'>https://github.com/w3c/csswg-drafts/issues/2987</a>
126+
Comment: <a href='https://github.com/w3c/csswg-drafts/issues/2987#issuecomment-410374314'>https://github.com/w3c/csswg-drafts/issues/2987#issuecomment-410374314</a>
127+
Comment: <a href='https://github.com/w3c/csswg-drafts/issues/2987#issuecomment-410385899'>https://github.com/w3c/csswg-drafts/issues/2987#issuecomment-410385899</a>
128+
Comment: <a href='https://github.com/w3c/csswg-drafts/issues/2987#issuecomment-410388088'>https://github.com/w3c/csswg-drafts/issues/2987#issuecomment-410388088</a>
129+
Comment: <a href='https://github.com/w3c/csswg-drafts/issues/2987#issuecomment-410809409'>https://github.com/w3c/csswg-drafts/issues/2987#issuecomment-410809409</a>
130+
Response: <a href='https://github.com/w3c/csswg-drafts/issues/2987#issuecomment-420710732'>https://github.com/w3c/csswg-drafts/issues/2987#issuecomment-420710732</a>
131+
Closed: Accepted
132+
Resolved: <a href='https://github.com/w3c/csswg-drafts/issues/2987#issuecomment-420710732'>https://github.com/w3c/csswg-drafts/issues/2987#issuecomment-420710732</a></pre>
121133
<script>
122134
(function () {
123135
var sheet = document.styleSheets[0];

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,3 +88,15 @@ Response: https://github.com/w3c/csswg-drafts/issues/2952#issuecomment-408369314
8888
Closed: Rejected
8989
Resolved: https://github.com/w3c/csswg-drafts/issues/2952#issuecomment-417018325
9090
Verified: https://github.com/w3c/csswg-drafts/issues/2952#issuecomment-417018325
91+
----
92+
Issue 11.
93+
Summary: containment probably shouldn't apply to most SVG elements
94+
From: David Baron
95+
Comment: https://github.com/w3c/csswg-drafts/issues/2987
96+
Comment: https://github.com/w3c/csswg-drafts/issues/2987#issuecomment-410374314
97+
Comment: https://github.com/w3c/csswg-drafts/issues/2987#issuecomment-410385899
98+
Comment: https://github.com/w3c/csswg-drafts/issues/2987#issuecomment-410388088
99+
Comment: https://github.com/w3c/csswg-drafts/issues/2987#issuecomment-410809409
100+
Response: https://github.com/w3c/csswg-drafts/issues/2987#issuecomment-420710732
101+
Closed: Accepted
102+
Resolved: https://github.com/w3c/csswg-drafts/issues/2987#issuecomment-420710732

0 commit comments

Comments
 (0)