Skip to content

Commit cf6c601

Browse files
committed
[css-view-transitions-2] Clarify a few nesting details
- view-transition-group is tree-scoped - nearest/custom-ident act like contain Closes w3c#10780 Closes w3c#10633
1 parent 0ab99f3 commit cf6c601

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

css-view-transitions-2/Overview.bs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -886,20 +886,20 @@ and by applying ''view-transition-group'' to the internal element referencing th
886886

887887
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.
888888

889+
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.
890+
889891
<dl dfn-type=value dfn-for=view-transition-group>
890892
: <dfn>normal</dfn>
891-
:: The [=used value=] is the element's [=nearest containing group name=].
892-
893-
: <dfn>nearest</dfn>
894-
:: 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''.
895-
896893
: <dfn>contain</dfn>
897-
:: The [=used value=] is the element's [=nearest containing group name=].
894+
:: The [=used value=] is the element's [=nearest containing group name=] given the [=relevant tree=].
895+
896+
Note: An element with ''view-transition-group/contain'' becomes the [=nearest containing group name=] for its [=tree/descendants=].
898897

899-
Note: Descendant elements are contained within this group by default, as it would be their element's [=nearest containing group name=].
898+
: <dfn>nearest</dfn>
899+
:: 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''.
900900

901901
: <dfn><<custom-ident>></dfn>
902-
:: 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=]
902+
:: 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=].
903903
</dl>
904904

905905
# Algorithms # {#algorithms}
@@ -1180,9 +1180,9 @@ When capturing the old or new state for an element, perform the following steps
11801180
### Compute the nearest containing 'view-transition-group' ### {#vt-group-nearest-contain}
11811181
<div algorithm="nearest containing group name">
11821182

1183-
To get the <dfn>nearest containing group name</dfn> for an {{Element}} |element|, perform the following steps:
1183+
To get the <dfn>nearest containing group name</dfn> for an {{Element}} |element| and a [=tree=] |tree|, perform the following steps:
11841184

1185-
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''.
1185+
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''.
11861186
1. If |nearestAncestorWithContain| is null, return ''view-transition-group/none''.
11871187
1. Otherwise, return |nearestAncestorWithContain|'s 'view-transition-name' [=computed value=].
11881188
</div>

0 commit comments

Comments
 (0)