Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Simplify tree-scope matching
  • Loading branch information
noamr committed Oct 2, 2024
commit e415d44d70a6774ac0cb3e51806606f13c973a06
14 changes: 7 additions & 7 deletions css-view-transitions-2/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -886,22 +886,22 @@ 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>
: <dfn>contain</dfn>
:: The [=used value=] is the element's [=nearest containing group name=] given the [=relevant tree=].
:: The [=used value=] is the element's [=nearest containing group name=].

Note: An element with ''view-transition-group/contain'' becomes the [=nearest containing group name=] for its [=tree/descendants=].

: <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''.
:: The [=used value=] is the 'view-transition-name' [=computed value=] of the nearest [=tree/ancestor=] 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 [=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=].
:: The [=used value=] is the given <<custom-ident>> if the element has an [=tree/ancestor=] whose 'view-transition-name' [=computed value=] is that <<custom-ident>>, otherwise the element's [=nearest containing group name=].
</dl>

When the ''view-transition-group'' and ''view-transition-name'' properties are declared in a different [=tree=], ''view-transition-group'' resolves to the [=nearest containing group name=].

# Algorithms # {#algorithms}

## Data structures ## {#cross-doc-data-structures}
Expand Down Expand Up @@ -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| and a [=tree=] |tree|, perform the following steps:
To get the <dfn>nearest containing group name</dfn> for an {{Element}} |element|, perform the following steps:

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. Let |nearestAncestorWithContain| be |element|'s nearest [=tree/ancestor=] 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>
Expand Down