Re: [csswg-drafts] [css-view-transitions-1] Handling changes in aspect ratio for non-replaced elements (#9202)

This is an intentional behavior, since both the old and the new snapshots are captures as replaced elements. That is, they don't relayout and thus the only behavior you can get is a stretch (unless you don't scale at all, of course). 

Likewise, pulling inner into a separate `view-transition-name`, causes that element to be represented as a sibling pseudo element. So although your dom structure is something like the following
```html
<div class=box>
  <div class=inner></div>
</div>
```
the pseudo structure that results from this is something like the following
```html
::view-transition
  ::view-transition-group(box)
     ::view-transition-image-pair(box)
        ::view-transition-old(box)
        ::view-transition-new(box)
  ::view-transition-group(inner)
     ::view-transition-image-pair(inner)
        ::view-transition-old(inner)
        ::view-transition-new(inner)
```
This "detaches" the two elements

We have plans to extend this to be able to nest the inner pseudo elements in the box inner elements (see https://github.com/WICG/view-transitions/blob/main/explainer.md#nested-transition-groups) but it's unclear on whether this is going to happen soon.

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


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

Received on Thursday, 17 August 2023 16:15:00 UTC