Re: [csswg-drafts] [css-view-transitions-2] view-transition-name determined by element (#8320)

> Minor thought on `auto` vs `element-uuid()`.
> 
> Imagine this, which uses the `ident()` proposal above:
> 
> ```css
> .card {
>   --card-id: element-uuid();
>   view-transition-name: ident(var(--card-id));
> 
>   img {
>     view-transition-name: ident(var(--card-id) "-img");
>   }
> }
> ```
> 
> This works as long as the card elements remain the same elements, but it works even if the img within is a different element.
> 
> That doesn't seem possible with `auto`.

Practically, I don't see how this is different from:

```css
.card {
  view-transition-name: element-uuid();

  img {
    view-transition-name: element-uuid();
  }
}
```

In which case, `auto` would also do the job.


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


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

Received on Tuesday, 7 May 2024 21:08:36 UTC