Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions css-containment/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,12 @@ Paint Containment</h3>

Giving an element <dfn export>paint containment</dfn> has the following effects:

1. The contents of the element must be clipped to the element's content box.
This includes both the paint of the descendants and their geometry (similar to overflow).
1. As specified in [[!CSS-OVERFLOW-3]],
the computed value the 'overflow-x' and 'overflow-y' is changed to ''overflow/clip''
if it would otherwise have been ''overflow/visible''.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer "If the computed value of overflow-x or overflow-y would otherwise have been 'visible', it must instead compute to 'clip'. [[!CSS-OVERFLOW-3]]"

<span class=note>This means that regardless of the specified value of 'overflow',
the contents of the element is clipped to the element's content box,
including both the paint of the descendants and their geometry</span>
2. The element must act as a containing block for absolutely positioned and fixed positioned descendants.
3. The element must be a <a>formatting context</a>.

Expand All @@ -208,7 +212,8 @@ Paint Containment</h3>
the UA can directly skip trying to paint its contents,
as they're guaranteed to be off-screen/obscured as well.

2. If the containing element is ''overflow:visible'',
2. If the containing element would have been ''overflow:visible'',
it becomes ''overflow:clip'' and
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line sounds like normative instructions; I'd prefer a parenthetical like (but is now overflow:clip due to paint containment), or something more direct, like "If the containing element's overflow has been changed to 'clip' (because it was originally visible), ..."

the UA can reserve "canvas" space for the element exactly the element's size.
(In similar, scrollable, situations, like ''overflow: hidden'',
it's possible to scroll to the currently-clipped content,
Expand Down
11 changes: 11 additions & 0 deletions css-overflow/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ type: dfn; spec:css-multicol-1; text:overflow column
<pre class="anchors">
url: http://www.w3.org/TR/2008/CR-css3-marquee-20081205/#the-overflow-style; type: property; text: overflow-style;
url: http://dev.w3.org/csswg/selectors-3/#subject; type: dfn; text: subject;
url: http://dev.w3.org/csswg/css-containment/#propdef-contain; type: property; text: contain
url: http://dev.w3.org/csswg/css-containment/#paint-containment; type: dfn; text: paint containment
</pre>
<style>
table.source-demo-pair {
Expand Down Expand Up @@ -420,6 +422,15 @@ Introduction</h2>
then computed values are the cascaded values
with ''overflow/visible'' changed to ''overflow/auto''.
</li>
<li>
Otherwise, if both cascaded values are ''overflow/visible''
and the computed value of 'contain' is
one that activates <a>paint containment</a>
(e.g. ''contain:strict''
or ''contain: paint''
or ''contain: layout paint''…),
then the computed values of both 'overflow-x' and 'overflow-y'
are changed to ''overflow/clip''.</li>
<li>
Otherwise, the computed values are as specified.
</li>
Expand Down
Loading