Re: [csswg-drafts] [css-shared-element-transitions-1] Renaming and brevity (#7788)

> We cold drop -root, and just have ::view-transition without parens be the root

That makes things ambiguous. Especially because we do want the function syntax to allow selecting all pseudo-elements for a particular type. For example:

```css
::view-transition
::view-transition(*)
::view-transition-set(*)
::view-transition-old(*)
::view-transition-new(*)
```

The fact that `::view-transition(*)` and `::view-transition` selects different elements is not intuitive. `::view-transition-root` is longer but better in this regard.

> document.createViewTransition();

See related discussion in #7828, is document.transition() or document.transitionView() better to make it obvious that it also starts the transition (like element.animate()).

> How well does this structure work with your nesting proposal?

Nesting could allow us to drop the transition word since it would be obvious in the syntax:

```css
::view-transition-root
::view-transition-root::view(name)
::view-transition-root::view(name)::view-set
::view-transition-root::view(name)::view-set::view-old
::view-transition-root::view(name)::view-set::view-new
```

But the css function syntax in the first one seems much simpler to directly target these elements. Do you think it's better to just go with those? If we do resolve on backing these with a pseudo-element tree (instead of shadow DOM) then the nested syntax will work naturally (similar to other pseudo-elements) but with the longer name. I think that's fine since developers will likely use the function syntax.

```css
::view-transition-root::view-transition(name)::view-transition-set::view-transition-old
```

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


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

Received on Wednesday, 5 October 2022 18:14:12 UTC