Re: [csswg-drafts] [css-view-transitions-2] Optimize no content change animations (#9406)

Big +1 to not capturing/animating unnecessarily.

> Perhaps a new CSS property or addition to the existing `view-transition-name` like `view-transition-name: target no-content-animation`

Tacking that onto `view-transition-name` seems weird. Best to have a different property to indicate what aspects needs to be captured.

Something like this (🚲🛖):

```
view-transition-capture: all | position-only;
```

> The pseudo-DOM won't generate a `::view-transition-old` and there will be no fade-in animation on `::view-transition-new` but rest of the UA CSS is the same.

I agree that a `::view-transition-old` makes no sense, but adding only a `::view-transition-new` can cause conflicts with authors relying `::view-transition-new(x):only-child`. Because that selector matches in this case, it will result in a wrong animation. Simply ignoring all properties defined by the author in this situation seems counterintuitive.

What is none of those two pseudos was generated at all? The snapshotted view would still need to be inserted into the pseudo tree (to have something visual on the screen), but since its not matched by any of the existing pseudos authors can not target it.

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


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

Received on Tuesday, 26 September 2023 07:06:28 UTC