However, if there is a non-zero overflow-clip-margin, or overflow-clip along one axis only, the clip doesn't clip the content to the padding edge. According to the current spec, the cases are not "having a content clip".
If we treat the cases as "having a content clip", we have the following choices for the root intersection rectangle:
the padding box
the client bounding box (i.e. the border box rect if the box is not fragmented)
the clipping rect (in the case of overflow-clip only along one axis, the rect has infinite bounds in the unclipped direction)
intersection of 2 and 3
The definition of the target bounding box also has an issue in the cases, but perhaps it's an issue with https://drafts.csswg.org/cssom-view-1/#element-get-the-bounding-box instead of intersection observer. Currently Chrome uses the union of the border box rect and the clip rect if there is effective overflow-clip-margin.
The spec (root intersection rect) says "An Element is defined as having a content clip if its computed style has overflow properties that cause its content to be clipped to the element’s padding edge. ... if the intersection root has a content clip ...".
However, if there is a non-zero
overflow-clip-margin
, oroverflow-clip
along one axis only, the clip doesn't clip the content to the padding edge. According to the current spec, the cases are not "having a content clip".If we treat the cases as "having a content clip", we have the following choices for the root intersection rectangle:
The definition of the target bounding box also has an issue in the cases, but perhaps it's an issue with https://drafts.csswg.org/cssom-view-1/#element-get-the-bounding-box instead of intersection observer. Currently Chrome uses the union of the border box rect and the clip rect if there is effective
overflow-clip-margin
.