Re: [csswg-drafts] [css-view-transitions-2] Ignore offscreen elements from participating in transitions (#8282)

The CSS Working Group just discussed `[css-view-transitions-2] Ignore offscreen elements from participating in transitions`, and agreed to the following:

* ``RESOLVED: ::view-transition-old` renders new live image (if available) if old element is offscreen at capture time``
* ``RESOLVED: The geometry animation on the `::view-transition-group` pseudo is same as before.``

<details><summary>The full IRC log of that discussion</summary>
&lt;fantasai> s/any other/Seeing strong consensus here, can always re-open. Any other/<br>
&lt;chrishtr> khush: this is a continuation of something discussed at the F2F<br>
&lt;chrishtr> khush: we had a high-level resolution that we should avoid capturing things offscreen, and in particular not capture images for them<br>
&lt;chrishtr> khush: today I'd like to go into UA styles for this<br>
&lt;chrishtr> khush: for something in the old and new state, proposal is that we keep size animations<br>
&lt;fantasai> +1<br>
&lt;chrishtr> khush: another question was whether to keep the pseudo element for the old thing. propose to keep it because there developer code expects it<br>
&lt;chrishtr> khush: "there is developer code that expects it"<br>
&lt;chrishtr> khush: think there would be less of a compat risk if the new image had something instead of nothing?<br>
&lt;chrishtr> khush: by default you get a cross-fade in these cases, but don't want to do that and instead just show the new image<br>
&lt;chrishtr> khush: propose that there be a 0->0 opacity animation for the old and 1->1 for the new. reiterating that all this is to minimize compat risk.<br>
&lt;chrishtr> khush: also propose removing mix-blend-mode: plus-lighther<br>
&lt;chrishtr> khush: for exit animations, seems less clear<br>
&lt;chrishtr> khush: in these case you're animating an element that has no content<br>
&lt;chrishtr> khush: one option is to generate a new pseudo and animations are technically there but irrelevant but it doesn't exist, another option is to have no pseudo<br>
&lt;Rossen7> ack fantasai<br>
&lt;chrishtr> fantasai: I agree that the option about not generating a pseudo is a bad option, we shouldn't do that<br>
&lt;chrishtr> fantasai: as for generating the pseudo but having no image backing it, the whole point is for cases where it's offscreen before and after right?<br>
&lt;chrishtr> khush: propose we do it based only on the old state, because it has to be done at the beginning of the animation.<br>
&lt;chrishtr> khush: even for cases where things animate on screen it seems ok to skip the image because the user never saw the old content anyway<br>
&lt;chrishtr> khush: reason to keep around the pseudo is because the developer might have animation keyframes for it<br>
&lt;chrishtr> s/khush/flackr/<br>
&lt;chrishtr> fantasai: the alternative would be that the old pseudo has no image and the new one is 1->1. Either way you're just showing the new image<br>
&lt;chrishtr> flackr: default behavior is the same in either case<br>
&lt;chrishtr> khush: that's why I'm lukewarm on it, because it's hard to say what is less compat risky without deeper analysis<br>
&lt;chrishtr> fantasai: would it be a problem if we set up the cross-fade animation as normal?<br>
&lt;chrishtr> khush: if you set up the cross-fade as normal, then you're assuming the pseudos are all set up and it cross-fades?<br>
&lt;chrishtr> khush: yes, but it makes it harder to optimize out in the browser implementationo<br>
&lt;chrishtr> fantasai: if it's really needed for optimization that's fine, but otherwise just due to implementation complexity..<br>
&lt;chrishtr> vmpstr: we can probably optimize the animation by detecting this situation<br>
&lt;chrishtr> khush: if we keep the default cross-fade it is harder to detect...<br>
&lt;chrishtr> vmpstr: harder optimization but plausible to do so<br>
&lt;chrishtr> khush: if needed I can find a hack to optimize<br>
&lt;chrishtr> flackr: from a developer perspective it's better not to have animations be different in these situations<br>
&lt;chrishtr> khush: remaining questions is just about not having cross-fade, and ?<br>
&lt;chrishtr> khush: ok resolving on the first two question and then investigating implementability of avoiding cross-fade changes<br>
&lt;flackr> +1<br>
&lt;khush> `::view-transition-old` renders new live image (if available) if old element is offscreen at capture time<br>
&lt;chrishtr> RESOLVED: ::view-transition-old` renders new live image (if available) if old element is offscreen at capture time<br>
&lt;khush> The geometry animation on the `::view-transition-group` pseudo is same as before.<br>
&lt;chrishtr> RESOLVED: The geometry animation on the `::view-transition-group` pseudo is same as before.<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8282#issuecomment-2192185792 using your GitHub account


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

Received on Wednesday, 26 June 2024 16:45:24 UTC