Re: [csswg-drafts] [css-view-transitions-1] CSS selector syntax for generated elements and API names (#7788)

In the interest of summarizing this for a in-person discussion, below is the list of elements that we need to have a name for:

* view transition root, the top candidate seems to be `::view-transition`
* the container element, which is the child of the root and has size/transform of the underlying element on it. The top contender is `::view-transition-container`
* The wrapper element, which has isolation and contains in it one or two images. This doesn't have consensus, with the most of the discussion being about this element
* the outgoing image from the "old" state. Top choice: `::view-transition-old`
* the incoming image from the "new" state. Top choice: `::view-transition-new`
* the function to initiate the transition, currently `createDocumentTransition`. Since this is also now specced to begin the transition, I prefer a verb name with the proposal: `document.transitionView()` read as a verb, not a noun, which is analogous to `element.animate()`. 

----

Also, we don't have an agreement on the selector syntax
**Option 1** This should be chained like:
`html::view-transition::view-transition-container(foo)::view-transition-some-wrapper(foo)::view-transition-old(foo)`
**Option 2** presumably we can drop "foo" and "view-transition" prefix from nested elements:
`html::view-transition::container(foo)::some-wrapper::old`

**Option 3** or do we select this as if they are all children of html: 
`html::view-transition`, `html::view-transition-old(foo)`, etc

**Option 4** or do we have part-like selector function that just "figures it out":
`::view-transition-part(container foo)`, `::view-transition-part(old foo)`

The last option is also related to #7928 

My proposal is to chain this to do option 1 and option 4. Chain it like this:
`html::view-transition::view-transition-container(foo)::view-transition-some-wrapper(foo)::view-transition-old(foo)`
and also provide a convenience part-like function:
`view-transition-part(container foo)` 

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


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

Received on Friday, 21 October 2022 18:32:59 UTC