You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<pclass=p-summarydata-fill-with=abstract>This CSS module describes the <spanclass=cssdata-link-type=maybetitle=clip>clip</span> value for the <aclass=propertydata-link-type=propdeschref=http://dev.w3.org/csswg/css-overflow-3/#overflowtitle=overflow>overflow</a> property, which is similar to the <spanclass=cssdata-link-type=maybetitle=hidden>hidden</span> value, but imposes stricter constraints on the element.
71
+
<pclass=p-summarydata-fill-with=abstract>This CSS module describes the <aclass=propertydata-link-type=propdeschref=#propdef-containtitle=contain>contain</a> 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.
72
72
<ahref=http://www.w3.org/TR/CSS/>CSS</a> is a language for describing the rendering of structured documents
so people can opt into particular forms of containment without going whole-hog,
169
169
if they really need to?
170
170
171
+
<divclass=example>
172
+
<aclass=propertydata-link-type=propdeschref=#propdef-containtitle=contain>contain</a> is useful when used widely on a page,
173
+
particularly when a page contains a lot of "widgets" which are all independent.
174
+
175
+
<p> For example, assume a micropost social network had markup something like this:
176
+
177
+
<preclass=css> <body>
178
+
<aside class='sidebar'>...</aside>
179
+
<article class='messages'>
180
+
<section class='message'>
181
+
Lol, check out this dog: images.example.com/jsK3jkl
182
+
</section>
183
+
<section class='message'>
184
+
I had a ham sandwich today. #goodtimes
185
+
</section>
186
+
<section class='message'>
187
+
I have political opinions that you need to hear!
188
+
</section>
189
+
…
190
+
</article>
191
+
</body>
192
+
</pre>
193
+
<p> There are probably a <em>lot</em> of messages displayed on the site,
194
+
but each is independent and won’t affect anything else on the site.
195
+
As such, each can be marked with <aclass=cssdata-link-type=propdeschref=#propdef-containtitle=contain>contain: strict</a> to communicate this to the user agent,
196
+
so it can optimize the page and skip a lot of computation for messages that are off-screen.
197
+
</div>
198
+
171
199
<p> An element that is <dfndata-dfn-type=dfndata-export="" id=strictly-contained>strictly contained<aclass=self-linkhref=#strictly-contained></a></dfn> operates under the following restrictions:
Abstract: This CSS module describes the ''clip'' value for the 'overflow' property, which is similar to the ''hidden'' value, but imposes stricter constraints on the element.
10
+
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.
0 commit comments