Re: [w3ctag/design-reviews] CSS View Transitions - Nested View Transition Groups (Issue #1061)

xiaochengh left a comment (w3ctag/design-reviews#1061)

Hi @vmpstr, could you clarify a question, in case I misunderstood how this feature works?

In the example in your explainer, the view transition pseudo element tree after using `view-transition-group` is:

```
::view-transition
  ::view-transition-group(container)         <-- clip-path applied on this node
    ::view-transition-image-pair(container)  <-- snapshot of container after clip applied
      ::view-transition-old(container)
      ::view-transition-new(container)
    ::view-transition-group(icon)
      ::view-transition-image-pair(icon)
        ::view-transition-old(icon)
        ::view-transition-new(icon)
```

It appears that clipping has been applied twice: once on the `::view-transition-group(container)` pseudo element, and then on `container` before the snapshot.

While double-clipping doesn't introduce any visible difference, wouldn't the result be wrong if there is e.g. `transform` or `opacity` on `container`, in which case `container` ends up double-transformed or double-filtered?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3ctag/design-reviews/issues/1061#issuecomment-2801209074
You are receiving this because you are subscribed to this thread.

Message ID: <w3ctag/design-reviews/issues/1061/2801209074@github.com>

Received on Monday, 14 April 2025 10:12:22 UTC