Skip to content

[css-view-transitions-2] Clarify a few nesting details#10964

Merged
noamr merged 4 commits intow3c:mainfrom
noamr:vt2-nesting2
Oct 14, 2024
Merged

[css-view-transitions-2] Clarify a few nesting details#10964
noamr merged 4 commits intow3c:mainfrom
noamr:vt2-nesting2

Conversation

@noamr
Copy link
Copy Markdown
Collaborator

@noamr noamr commented Sep 27, 2024

  • view-transition-group maintains the tree-scoping relationship
  • nearest/custom-ident act like contain for their descendants

Closes #10780
Closes #10633

See resolutions in the above issues.

@noamr noamr requested a review from khushalsagar September 27, 2024 14:21
Comment thread css-view-transitions-2/Overview.bs Outdated

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.
Copy link
Copy Markdown
Member

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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Comment thread css-view-transitions-2/Overview.bs Outdated
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''.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need to pass tree here? We can ignore the group if its computed value's tree scope doesn't match view-transition-name's tree scope.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@khushalsagar
Copy link
Copy Markdown
Member

Eh, it looks like you missed publishing new changes. :)

@noamr
Copy link
Copy Markdown
Collaborator Author

noamr commented Oct 2, 2024

Eh, it looks like you missed publishing new changes. :)

Oops, look now

noamr added 2 commits October 2, 2024 20:46
- view-transition-group is tree-scoped
- nearest/custom-ident act like contain

Closes w3c#10780
Closes w3c#10633
Comment thread css-view-transitions-2/Overview.bs Outdated
Comment thread css-view-transitions-2/Overview.bs Outdated
Comment thread css-view-transitions-2/Overview.bs
Comment thread css-view-transitions-2/Overview.bs Outdated
Comment thread css-view-transitions-2/Overview.bs Outdated
Copy link
Copy Markdown
Member

@khushalsagar khushalsagar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a lot better, thank you!

Comment thread css-view-transitions-2/Overview.bs Outdated
Co-authored-by: Khushal Sagar <63884798+khushalsagar@users.noreply.github.com>
@noamr noamr merged commit 9d7be5c into w3c:main Oct 14, 2024
@noamr noamr deleted the vt2-nesting2 branch October 14, 2024 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[css-view-transition-2] Should non-default view-transition-group act like contain? [css-view-transitions-2] view-transition-group and tree-scoping

2 participants