Re: [csswg-drafts] [css-contain] content-visibility: auto and SVG-as-image (#10347)

I mean, at least Gecko shares SVG-as-images.

A `content-visibility: auto` element in an iframe will, IIRC use an `IntersectionObserver`-like check to intersect **with the top level viewport**. But that doesn't work if your image can be painted in multiple places and the data is shared.

Consider:

```
<!doctype html>
<img src="foo.svg">
<div style="height: 5000px"></div>
<img src="foo.svg">
```

IIUC, the content would be "relevant" in both images regardless. While if they were iframes, the content will be relevant in the top iframe, but not in the bottom.

So I think that, effectively for this purpose at least, you just ignore `content-visibility: auto` (everything is relevant in an SVG image, kind of)

-- 
GitHub Notification of comment by emilio
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10347#issuecomment-2125093363 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 22 May 2024 15:31:02 UTC