-
Notifications
You must be signed in to change notification settings - Fork 759
[css-view-transitions-2] Clarify a few nesting details #10964
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- view-transition-group is tree-scoped - nearest/custom-ident act like contain Closes #10780 Closes #10633
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -886,20 +886,20 @@ and by applying ''view-transition-group'' to the internal element referencing th | |
|
|
||
| When the [=computed value=] of 'view-transition-name' for an element is ''view-transition-name/none'', its 'view-transition-group' [=used value=] is always resolved to ''view-transition-name/none'' as well. | ||
|
|
||
| The <dfn>relevant tree</dfn> for the 'view-transition-group' property is the [=tree=] that includes the element in which the property itself is declared. | ||
|
|
||
| <dl dfn-type=value dfn-for=view-transition-group> | ||
| : <dfn>normal</dfn> | ||
| :: The [=used value=] is the element's [=nearest containing group name=]. | ||
khushalsagar marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| : <dfn>nearest</dfn> | ||
| :: The [=used value=] is the 'view-transition-name' [=computed value=] of the nearest ancestor whose 'view-transition-name' [=computed value=] is not ''view-transition-name/none''. | ||
|
|
||
| : <dfn>contain</dfn> | ||
| :: The [=used value=] is the element's [=nearest containing group name=]. | ||
| :: The [=used value=] is the element's [=nearest containing group name=] given the [=relevant tree=]. | ||
|
|
||
| Note: An element with ''view-transition-group/contain'' becomes the [=nearest containing group name=] for its [=tree/descendants=]. | ||
|
|
||
| Note: Descendant elements are contained within this group by default, as it would be their element's [=nearest containing group name=]. | ||
| : <dfn>nearest</dfn> | ||
| :: The [=used value=] is the 'view-transition-name' [=computed value=] of the nearest [=tree/ancestor=] in the [=relevant tree=] whose 'view-transition-name' [=computed value=] is not ''view-transition-name/none''. | ||
|
|
||
| : <dfn><<custom-ident>></dfn> | ||
| :: The [=used value=] is the given <<custom-ident>> if the element has an ancestor whose 'view-transition-name' [=computed value=] is that <<custom-ident>>, otherwise the element's [=nearest containing group name=] | ||
| :: The [=used value=] is the given <<custom-ident>> if the element has an [=tree/ancestor=] in the [=relevant tree=] whose 'view-transition-name' [=computed value=] is that <<custom-ident>>, otherwise the element's [=nearest containing group name=] given the [=relevant tree=]. | ||
| </dl> | ||
|
|
||
| # Algorithms # {#algorithms} | ||
|
|
@@ -1180,9 +1180,9 @@ When capturing the old or new state for an element, perform the following steps | |
| ### Compute the nearest containing 'view-transition-group' ### {#vt-group-nearest-contain} | ||
| <div algorithm="nearest containing group name"> | ||
|
|
||
| To get the <dfn>nearest containing group name</dfn> for an {{Element}} |element|, perform the following steps: | ||
| To get the <dfn>nearest containing group name</dfn> for an {{Element}} |element| and a [=tree=] |tree|, perform the following steps: | ||
|
|
||
| 1. Let |nearestAncestorWithContain| be |element|'s nearest ancestor whose 'view-transition-name' [=computed value=] is not ''view-transition-name/none'' and whose 'view-transition-group' [=computed value=] is ''view-transition-group/contain''. | ||
| 1. Let |nearestAncestorWithContain| be |element|'s nearest [=tree/ancestor=] in |tree|, whose 'view-transition-name' [=computed value=] is not ''view-transition-name/none'' and whose 'view-transition-group' [=computed value=] is not ''view-transition-group/normal''. | ||
|
||
| 1. If |nearestAncestorWithContain| is null, return ''view-transition-group/none''. | ||
| 1. Otherwise, return |nearestAncestorWithContain|'s 'view-transition-name' [=computed value=]. | ||
| </div> | ||
|
|
||
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.
This is trying to capture the tree scope for the computed value right? Would it be enough to say that the used value for group is "normal" if it doesn't match view transition name's scope. Because the group only applies if the name does and we have checks to only apply the name if the tree scope matches the transition's tree 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.
Done