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

> > Not sure if the original comment can be recovered, but here is a copy of it from my mails. @Psychpsyo wrote:
> > > Hmm this makes me think that perhaps this is indeed a separate feature, since you should be able to morph the borders and still not capture the contents.
> 
> That is what @noamr said, not me. (I also don't remember what I commented.) But yes, that is what `static morph` would do.
> 
> > Is there a point in `static cross-fade` though? If we're not capturing the old contents, we could probably still capture the borders etc and morph them. They're unlikely to change anyway and capturing them is cheap.
> 
> `static cross-fade` essentially means "slide this element over but don't capture the contents and also don't capture the borders etc." So it indicates that you only want the absolute minimum amount of transition. The author is given the choice of whether or not they want to capture the borders etc. for regular transitions, why should that choice not exist for optimized ones?

Probably because this doesn't add much as an optimization. If we're not capturing the old snapshot, capturing the box decorations only is cheap, and if they don't change they also wouldn't animate. 

Note also that the word `static` is confusing here: we're actually showing a dynamic image of the *new content*. 
I think `view-transition-style` is still good because it focuses on the UX result and not on the mechanics of how they're
achieved, but this is arguable.

I see this as 3 styles of transition:
- Crossfade between the old and new element snapshots (`crossfade`?)
- Crossfade the contents and animate the box decorations individually (`morph`?)
- Display the new content only and morph the box decorations (`decoration-only`?)

We can also have `auto` that means something like:
- Use `morph` when containing nested groups
- Use `decoration-only` when animating from very far from the viewport (`100vw, 100vh`?)
- Otherwise, use `crossfade`


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


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

Received on Monday, 19 August 2024 09:24:45 UTC