Re: [csswg-drafts] [css-shared-element-transitions-1] Renaming and brevity (#7788)

> the ::view-image-group(name) provides the blending isolation between the images, so nested :views don't get impacted by the blending.

Clarifying this a bit more. Currently our DOM structure looks like this per tag:

```
::view(foo)
|_::view-image-group(foo)
   |_::view-old(foo)
   |_::view-new(foo)
```

And `::view-image-group` has the `isolation:isolate`. If `::view` doesn't have any content then `::view-image-group` is a no-op and the isolation can directly be added to `::view`. But there are a couple of extensions which will make `::view` have other content:

1. [Nesting](https://github.com/WICG/shared-element-transitions/blob/main/explainer.md#nested-transition-containers) which @jakearchibald mentioned. In that case our DOM structure could look like:

   ```
    ::view(foo)
    |_::view-image-group(foo)
    |  |_::view-old(foo)
    |  |_::view-new(foo)
    ::view(bar)
        |_::view-image-group(bar)
           |_::view-old(bar)
           |_::view-new(bar)
   ```

2. [Content capture](https://github.com/WICG/shared-element-transitions/blob/main/explainer.md#more-granular-style-capture) where we want the snapshot that goes into old/new to be limited to the element's descendants. Box decorations (like `background`) are kept as styles which are applied to `::view` so you effectively get the same rendering as the element. Except you can interpolate those styles instead of a cross-fade with those baked into the snapshot. In that case `::view(foo)` would have a background and blending the 2 images should happen before drawing the result into this background.

I'm good with renaming `::view-root` to include the word transition so its obvious that it's related to this feature. Maybe `::view-transition-root` then. Depending on the syntax we can avoid add transition for all the new pseudos but sounds like for any property which appears outside the nested syntax we do want the word transition there?

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


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

Received on Wednesday, 28 September 2022 19:01:12 UTC