You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Filing a separate issue to track the use-case identified in the comment here, pasted below:
I'll note that our suggestion doesn't rely specifically on the specific mapping of class/element syntax, but that provides a good example. Whatever the selector-syntax mapping (@FremyCompany's suggestion of IDs might make more sense), the goal is just to allow compound/complex selectors in the function.
One reason for that might be exposing the hierarchy. The more important goal in my mind was the ability to differentiate what happens in these three instances:
There is only a new image.
There is only an old image.
There are both old and new images.
The solution mentioned a few times for that is using :only-child/:not(:only-child) on the element in question. I assume that solution is also possible with the current proposal?
html::view-transition-old(*):only-child {
/* this is a default exit animation */
}
This could be done with html::view-transition-old(*):only-child but @jakearchibald highlighted that " it's tricky because what does ::before:only-child mean? We might need to allow-list which pseudos can use :only-child."
The text was updated successfully, but these errors were encountered:
JakeA: would folks be happy with us using :only-child for view transitions?
TabAtkins: As long as it matches intent
TabAtkins: defined as up to two children, and this one says if you have only one
JakeA: But usually it doesn't count pseudos...
JakeA: but I guess if we're appying it to a pseudo
…
TabAtkins: pseudo-elements live in the tree
RESOLVED: Allow pseudo-elements to define additional pseudo-classes they allow to be placed after them.
Some pseudo-elements are defined to have internal structure.
And CSS View Transitions says:
The precise tree structure, and in particular the order of sibling pseudo-elements, is defined in the setup transition pseudo-elements algorithm.
Can I assume that all except ::view-transition-new() and ::view-transition-old() have an internal structure? I do not have a good knowledge of CSS View Transitions and it is not easy for me to answer this from reading the above mentioned algorithm.
Filing a separate issue to track the use-case identified in the comment here, pasted below:
I'll note that our suggestion doesn't rely specifically on the specific mapping of class/element syntax, but that provides a good example. Whatever the selector-syntax mapping (@FremyCompany's suggestion of IDs might make more sense), the goal is just to allow compound/complex selectors in the function.
One reason for that might be exposing the hierarchy. The more important goal in my mind was the ability to differentiate what happens in these three instances:
new
image.old
image.old
andnew
images.The solution mentioned a few times for that is using
:only-child
/:not(:only-child)
on the element in question. I assume that solution is also possible with the current proposal?This could be done with
html::view-transition-old(*):only-child
but @jakearchibald highlighted that " it's tricky because what does ::before:only-child mean? We might need to allow-list which pseudos can use :only-child."The text was updated successfully, but these errors were encountered: