Re: [csswg-drafts] [css-view-transitions-1] Questions about capturing (#8958)

Sorry for the late reply. Adding stuff on top of @noamr's reply.

- For 1 and 2, let's discuss more on https://github.com/w3c/csswg-drafts/issues/8230. There's a few other related issues about when to use properties that correspond to logical vs physical coordinates which could use feedback : https://github.com/w3c/csswg-drafts/issues/8886 and https://github.com/w3c/csswg-drafts/issues/9057.

- For 4, how exactly it works is an implementation detail. The spec details how the browser should generate an image representation of an element. And characteristics about that image which is required by layout of replaced elements (like what its natural size is). The details required for compatibility across browsers. But how the browser hooks up that image into the replaced element is an internal detail.
   
   @noamr has a PR to make the spec clearer in this area: https://github.com/w3c/csswg-drafts/pull/9028

- For 5, sure here's a PR for it: https://github.com/w3c/csswg-drafts/pull/9059

- For 6, effects on the element (which apply to its descendants) are included in the capture. But if the element has an effect applied to it from an ancestor, that will be ignored. For example, if the element has opacity from anything in its ancestor chain, it will disappear during the transition. We want [nested transition groups](https://github.com/WICG/view-transitions/blob/main/explainer.md#nested-transition-groups) and [more granular style capture](https://github.com/WICG/view-transitions/blob/main/explainer.md#more-granular-style-capture) to support these use-cases going forward.
   
   https://github.com/w3c/csswg-drafts/issues/8962 is related to this.
   
- For 7, yeah we want to render the entire Document, including canvas background and any effects (like filter) which are on the document element's computed style but are lifted onto the root stacking context. Happy for suggestions to improve the wording here.

- For 8, yeah. Capture ignores any descendants which are captured in a view transition. It's in the spec [here](https://drafts.csswg.org/css-view-transitions-1/#capture-rendering-characteristics-algorithm:~:text=For%20each%20descendant%20of%20shadow%2Dincluding%20descendant%20Element%20and%20pseudo%2Delement%20of%20element%2C%20if%20descendant%20is%20captured%20in%20a%20view%20transition%2C%20then%20skip%20painting%20descendant.).
   
   Intentionally not saying those with a view-transition-name since cases like [fragmentation](https://drafts.csswg.org/css-view-transitions-1/#capture-old-state-algorithm:~:text=If%20element%20has%20more%20than%20one%20box%20fragment%2C%20then%20continue.) ignore the `view-transition-name` property. I just realized though that [captured in a view transition](https://drafts.csswg.org/css-view-transitions-1/#captured-in-a-view-transition) is only being set for elements in the new DOM but skipping independently transitioning elements in the snapshot needs to be done for old images as well. So might need to refactor the spec a bit.

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


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

Received on Tuesday, 11 July 2023 22:08:17 UTC