[csswg-drafts] [css-contain-2] filter effects and "relevant to the user" (#7711)

frivoal has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-contain-2] filter effects and "relevant to the user" ==
from the [spec](https://drafts.csswg.org/css-contain-2/#relevant-to-the-user):

> An element is relevant to the user if any of the following conditions are true:
> 
> * The element is "on-screen": its paint containment box's overflow clip edge intersects with the viewport, or a user-agent defined margin around the viewport.
>
>     Note: This margin is meant to allow the user agent to begin preparing for an element to be in the viewport soon. A margin of 50% is suggested as a reasonable default.

Technically, the "or a ua defined margin" part of this gives enough flexibility for the ua to extend the relevant area in whatever way it wants, including smart ones, but this phrasing, especially when accompanied with the note, suggests that we're talking about a fixed-size margin rather than something that may depend on content.

However, as discussed in https://github.com/w3c/csswg-drafts/issues/6325, non-local filter effects on the ancestors of the element with paint containment can cause the ua to need to render off screen paint contained elements, in order to get the filter right.

It seems that the notion of "relevant to the user" should account for that as well.

> * The element is "on-screen": its paint containment box's overflow clip edge intersects with the viewport, or a user-agent defined margin around the viewport<ins>, or is close enough to the viewport that rendering it is necessary to calculate filter effects correctly</ins>.

A sufficient UA margin around the viewport is likely to make the effect of any filter barely noticeable, so maybe we don't actually need to bother, but if we're aiming for strict correctness, I think we need to take this into account.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7711 using your GitHub account


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

Received on Thursday, 8 September 2022 02:05:25 UTC