[csswg-drafts] [css-view-transitions-1] Clarify capturing the background of the root element (in terms of css-backgrounds-3) (#11083)

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

== [css-view-transitions-1] Clarify capturing the background of the root element (in terms of css-backgrounds-3) ==
The steps for [capture the image](https://www.w3.org/TR/css-view-transitions-1/#capture-the-image-algorithm) say that the [canvas background](https://www.w3.org/TR/css-backgrounds-3/#canvas-background) should be included. I would assume that means that the 'canvas surface' is not included in the capture.

In terms of what should not be drawn while the view-transition is in progress, [4.2 View Transition Painting Order](https://www.w3.org/TR/css-view-transitions-1/#view-transition-stacking-layer) only says that "the boxes generated by any element in that [Document](https://dom.spec.whatwg.org/#document) with [captured in a view transition](https://www.w3.org/TR/css-view-transitions-1/#captured-in-a-view-transition) are [invisible](https://drafts.csswg.org/css-display-4/#invisible)." For the root element, should that also include the canvas background, top layer content, but not canvas surface that become invisible? Or should those be rendered in both the snapshot, as well as outside of it.

Some testcases:

[VT canvas background tests.zip](https://github.com/user-attachments/files/17513312/VT.canvas.background.tests.zip)

vt-canvas-background-drawn-outside-snapshots.html - Show that the canvas background color continues to be drawn outside of the view-transition snapshots
vt-canvas-background-drawn-inside-snapshots.html - Show that the canvas background color is also drawn inside the snapshots
vt-canvas-surface-drawn-inside-snapshots.html - Show that the canvas surface (white) gets drawn into the snapshots.
vt-canvas-background-image-not-outside-snapshots.html - Show that any images in the canvas background only end up in the snapshots, not both.

It seems that the current behaviour is that the canvas surface and background are both included in the snapshots, as well as remain visible outside of the snapshots while the transition is running.
The exception is any images that make up part of the canvas background, which only go into the snapshot and become invisible outside of the snapshots.

I think we need to figure out exactly which of these are intended or not, and clarify the spec for them. 

I don't think there's existing terminology to define just the canvas background color and not image.






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


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

Received on Thursday, 24 October 2024 21:57:56 UTC