Skip to content

Commit ef83cd2

Browse files
committed
Fix overflow clipping.
Fixes #504. The overflow property clips to padding edges, so IntersectionObserver should match that clip.
1 parent e1c3797 commit ef83cd2

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

index.bs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ urlPrefix: https://heycam.github.io/webidl/
5858
url: #hierarchyrequesterror; type: exception; text: HierarchyRequestError
5959
urlPrefix: https://drafts.csswg.org/css-box/
6060
url: #containing-block; type: dfn; text: containing block
61-
url: #content-area; type: dfn; text: content area
61+
url: #padding-area; type: dfn; text: padding area
62+
url: #padding-edge; type: dfn; text: padding edge
6263
urlPrefix: https://drafts.csswg.org/css-display/
6364
url: #containing-block-chain; type: dfn; text: containing block chain
6465
urlPrefix: http://www.w3.org/TR/css-masking-1/
@@ -307,7 +308,7 @@ interface IntersectionObserver {
307308
of this attribute will be [0].
308309
</div>
309310

310-
An {{Element}} is defined as having a <dfn for="IntersectionObserver">content clip</dfn> if its computed style has <a>overflow properties</a> that cause its content to be clipped to the element's padding edge.
311+
An {{Element}} is defined as having a <dfn for="IntersectionObserver">content clip</dfn> if its computed style has <a>overflow properties</a> that cause its content to be clipped to the element's <a>padding edge</a>.
311312

312313
The <dfn for=IntersectionObserver>root intersection rectangle</dfn>
313314
for an {{IntersectionObserver}}
@@ -321,7 +322,7 @@ is the rectangle we'll use to check against the targets.
321322
<dd>it's the size of the {{document}}'s <a>viewport</a> (note that this processing step can only be reached if the {{document}} is <a>fully active</a>).
322323

323324
<dt>Otherwise, if the <a>intersection root</a> has a <a>content clip</a>,
324-
<dd>it's the element's <a>content area</a>.
325+
<dd>it's the element's <a>padding area</a>.
325326

326327
<dt>Otherwise,
327328
<dd>it's the result of <a>getting the bounding box</a> for the <a>intersection root</a>.

0 commit comments

Comments
 (0)