-
Notifications
You must be signed in to change notification settings - Fork 657
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[css-view-transitions-2] Allow auto
as a keyword
#10922
base: main
Are you sure you want to change the base?
Conversation
`auto` resolves to either the element's ID, or to a unique identifier that is stable for the duration of the transition and is not web-observable. Resolution: w3c#8320 (comment) Closes w3c#8320
1. If |element| has an associated [=Element/id=], then return |element|'s [=Element/id=]. | ||
1. Return a unique string, which is not a <<custom-ident>>. This string should remain consistent and unique for this element and {{Document}}, at least for the lifetime of |element|'s [=node document=]'s [=active view transition=]. | ||
|
||
Note: this string is not web-observable, and is used for addressing the element in internal algorithms. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe also leave a note that this means for cross-document view transitions, elements using a unique string will turn into exit animations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do. Actually I need to make a change that keeps the ID
check tree-scoped, so will ask for a re-review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, mind taking another look at the scoping bit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually do we need any scoping text here? It looks like we do that when querying the computed value for view-transition-name
here: https://drafts.csswg.org/css-view-transitions-1/#document-scoped-view-transition-name.
So maybe just the change the step 1 here to say, "Let |computed| be the be the element’s document-scoped view transition name." linking back to that algo?
Note to self: A bunch of places like these will need to change for scoped transitions. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, because we read the ID. The ID might have a different tree-scope than the style where the view-transition-name
property is defined (if it's a ::part
), we need to specifically account for that and only read the ID if it's in the same scope.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, that would have the same meaning. We do have the other tree scope wording in L1 already
Yea but the way it's written right now it's not clear if it's overriding what's defined in L1.
I don't understand. This is just for auto
which is not in L1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just meant that the used value for auto
happens after we do a tree scope check on the computed value (defined in L1) right? So should we say that somewhere here, the algorithm right now just says we're using the computed value directly. And returns it for the custom ident case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
L1 just says Each [=view transition name=] is a [=tree-scoped name=]
. We don't change this, I don't think we need to add anything. The only special thing we do is check that scope vs the element's ID's scope if needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I see now, let me fix this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check now
Co-authored-by: Khushal Sagar <[email protected]>
auto
resolves to either the element's ID, or to a unique identifier that is stable for the duration of the transition and is not web-observable.Resolution: #8320 (comment)
Closes #8320