Re: [w3ctag/design-reviews] View Transition Classes (Issue #938)

> Right, so if you're capturing the names and classes before the transition, can't you just capture the view transition groups instead?

You mean reading the pseudo-element styles ahead of time?
Note that between the old and new document we might be changing documents, or other state might change.

e.g. `html.some-state::view-transition-group(*)` might be matched before the transition and not match during the transition (e.g. you call `document.documentElement.classList.remove("some-state")`) before the transition starts.

A lot of the current design of view transitions is based on the notion that the pseudo-elements are only created when the transition starts, we didn't want to break it for `view-transition-class`.

> Also, have you considered simply allowing a list of view transition names in the view-transition-group selector, e.g. instead of:
> 
> ```
> ::view-transition-group(list-item-1),
> ::view-transition-group(list-item-2),
> ::view-transition-group(list-item-3),
> ::view-transition-group(list-item-4),
> ::view-transition-group(list-item-5),
> ::view-transition-group(list-item-6),
> ::view-transition-group(list-item-7) {
>   background: green;
> }
> ```
> 
> do:
> 
> ```
> ::view-transition-group(list-item-1, list-item-2, list-item-3, list-item-4, list-item-5, list-item-6, list-item-7) {
>   background: green;
> }```
> ```

This seems error prone when weighing against
```css
div.box { view-transition-class: box } 
```

For the same reason we don't replace ordinary classes with `#id1, #id2, #id3` we don't want to do that here.

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

Message ID: <w3ctag/design-reviews/issues/938/2284537450@github.com>

Received on Monday, 12 August 2024 17:16:38 UTC