Skip to content
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-transition-2] view-transition-class and tree-scoping #10529

Closed
noamr opened this issue Jul 4, 2024 · 9 comments · Fixed by #10719
Closed

[css-view-transition-2] view-transition-class and tree-scoping #10529

noamr opened this issue Jul 4, 2024 · 9 comments · Fixed by #10719
Labels
css-view-transitions-2 View Transitions; New feature requests Needs Edits

Comments

@noamr
Copy link
Collaborator

noamr commented Jul 4, 2024

Following up on #10145, we should determine whether elements can define a view-transition-class inside shadow DOM that gets matched to a corresponding class in the pseudo-element (e.g. if the element is a ::part)..
Based on https://drafts.csswg.org/css-scoping-1/#shadow-names, I think it makes sense to allow that, as a view-transition-class is similar to giving an element a font-family that's defined in the root inside a @font-face.

@noamr
Copy link
Collaborator Author

noamr commented Jul 28, 2024

Thinking about this again, view-transition-class is not exactly a name-reference, but rather a name by itself, and the reference is in the pseudo-elements. It's more equivalent to container queries where the query has to be below the definition of the name.

I think the right approach here would be that view-transition-class is a scoped name, and is read from the same scope as the view-transition-name.

The only "quirk" about this is that the shadow DOM can define view-transition-class: none !important or some such and make a ::part not receive a view-transition-class. Perhaps that's OK.

@noamr noamr added the Agenda+ label Jul 28, 2024
@noamr
Copy link
Collaborator Author

noamr commented Jul 29, 2024

@nt1m @vmpstr @fantasai @khushalsagar any objections here? I think this is a non-controversial fix.

@nt1m
Copy link
Member

nt1m commented Jul 29, 2024

I guess it would be consistent with the name, which is fine.

@noamr
Copy link
Collaborator Author

noamr commented Jul 29, 2024

@astearns ok to do an offline resolution on this one?

@astearns
Copy link
Member

@noamr more comments and/or thumbs-ups would be good for an async resolution. Add a proposed resolution and the Async Resolution: Proposed tag if you’d like to go that route.

@noamr
Copy link
Collaborator Author

noamr commented Jul 29, 2024

Proposed resolution: view-transition-class is a tree-scoped name. It has to match the tree-scope of the view transition when read. De-facto, this means that it only applies in document-scoped stylesheets, and shadow-DOM can reset it to none using !important.

@noamr noamr added the Async Resolution: Proposed Candidate for auto-resolve with stated time limit label Jul 29, 2024
@khushalsagar
Copy link
Member

SGTM. So both view-transition-name and view-transition-class have to match the tree-scope of the view transition.

@astearns
Copy link
Member

The CSSWG will automatically accept this resolution one week from now if no objections are raised here. Anyone can add an emoji to this comment to express support. If you do not support this resolution, please add a new comment.

Proposed resolution: view-transition-class is a tree-scoped name.

@astearns astearns added Async Resolution: Call For Consensus Resolution will be called after time limit expires and removed Agenda+ Async Resolution: Proposed Candidate for auto-resolve with stated time limit labels Jul 30, 2024
@astearns
Copy link
Member

astearns commented Aug 7, 2024

RESOLVED: view-transition-class is a tree-scoped name

@astearns astearns added Needs Edits and removed Async Resolution: Call For Consensus Resolution will be called after time limit expires labels Aug 7, 2024
noamr added a commit to noamr/csswg-drafts that referenced this issue Aug 9, 2024
@noamr noamr closed this as completed in 951bab3 Aug 9, 2024
aarongable pushed a commit to chromium/chromium that referenced this issue Aug 12, 2024
Parse view-transition-class a s CSSScopedNameList, and match with the
document tree-scoped when capturing the old+new element.

CSSWG resolution: w3c/csswg-drafts#10529 (comment)

Bug: 358159341
Change-Id: Ib40816b8358bb9390a427bc4ea456d86f6060eab
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5776943
Reviewed-by: Khushal Sagar <khushalsagar@chromium.org>
Commit-Queue: Noam Rosenthal <nrosenthal@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1340430}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Aug 12, 2024
Parse view-transition-class a s CSSScopedNameList, and match with the
document tree-scoped when capturing the old+new element.

CSSWG resolution: w3c/csswg-drafts#10529 (comment)

Bug: 358159341
Change-Id: Ib40816b8358bb9390a427bc4ea456d86f6060eab
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5776943
Reviewed-by: Khushal Sagar <khushalsagar@chromium.org>
Commit-Queue: Noam Rosenthal <nrosenthal@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1340430}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Aug 12, 2024
Parse view-transition-class a s CSSScopedNameList, and match with the
document tree-scoped when capturing the old+new element.

CSSWG resolution: w3c/csswg-drafts#10529 (comment)

Bug: 358159341
Change-Id: Ib40816b8358bb9390a427bc4ea456d86f6060eab
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5776943
Reviewed-by: Khushal Sagar <khushalsagar@chromium.org>
Commit-Queue: Noam Rosenthal <nrosenthal@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1340430}
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Aug 15, 2024
…oped name, a=testonly

Automatic update from web-platform-tests
Make CSS view-transition-class a tree-scoped name

Parse view-transition-class a s CSSScopedNameList, and match with the
document tree-scoped when capturing the old+new element.

CSSWG resolution: w3c/csswg-drafts#10529 (comment)

Bug: 358159341
Change-Id: Ib40816b8358bb9390a427bc4ea456d86f6060eab
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5776943
Reviewed-by: Khushal Sagar <khushalsagar@chromium.org>
Commit-Queue: Noam Rosenthal <nrosenthal@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1340430}

--

wpt-commits: c88a90be14eeb523b2941c994e605da1feb61e77
wpt-pr: 47568
ErichDonGubler pushed a commit to erichdongubler-mozilla/firefox that referenced this issue Aug 19, 2024
…oped name, a=testonly

Automatic update from web-platform-tests
Make CSS view-transition-class a tree-scoped name

Parse view-transition-class a s CSSScopedNameList, and match with the
document tree-scoped when capturing the old+new element.

CSSWG resolution: w3c/csswg-drafts#10529 (comment)

Bug: 358159341
Change-Id: Ib40816b8358bb9390a427bc4ea456d86f6060eab
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5776943
Reviewed-by: Khushal Sagar <khushalsagar@chromium.org>
Commit-Queue: Noam Rosenthal <nrosenthal@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1340430}

--

wpt-commits: c88a90be14eeb523b2941c994e605da1feb61e77
wpt-pr: 47568
i3roly pushed a commit to i3roly/firefox-dynasty that referenced this issue Aug 22, 2024
…oped name, a=testonly

Automatic update from web-platform-tests
Make CSS view-transition-class a tree-scoped name

Parse view-transition-class a s CSSScopedNameList, and match with the
document tree-scoped when capturing the old+new element.

CSSWG resolution: w3c/csswg-drafts#10529 (comment)

Bug: 358159341
Change-Id: Ib40816b8358bb9390a427bc4ea456d86f6060eab
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5776943
Reviewed-by: Khushal Sagar <khushalsagar@chromium.org>
Commit-Queue: Noam Rosenthal <nrosenthal@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1340430}

--

wpt-commits: c88a90be14eeb523b2941c994e605da1feb61e77
wpt-pr: 47568
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue Aug 23, 2024
…oped name, a=testonly

Automatic update from web-platform-tests
Make CSS view-transition-class a tree-scoped name

Parse view-transition-class a s CSSScopedNameList, and match with the
document tree-scoped when capturing the old+new element.

CSSWG resolution: w3c/csswg-drafts#10529 (comment)

Bug: 358159341
Change-Id: Ib40816b8358bb9390a427bc4ea456d86f6060eab
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5776943
Reviewed-by: Khushal Sagar <khushalsagarchromium.org>
Commit-Queue: Noam Rosenthal <nrosenthalchromium.org>
Cr-Commit-Position: refs/heads/main{#1340430}

--

wpt-commits: c88a90be14eeb523b2941c994e605da1feb61e77
wpt-pr: 47568

UltraBlame original commit: 26eb8cfa4b79e31b94b703759edb04a4658ec2e5
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue Aug 23, 2024
…oped name, a=testonly

Automatic update from web-platform-tests
Make CSS view-transition-class a tree-scoped name

Parse view-transition-class a s CSSScopedNameList, and match with the
document tree-scoped when capturing the old+new element.

CSSWG resolution: w3c/csswg-drafts#10529 (comment)

Bug: 358159341
Change-Id: Ib40816b8358bb9390a427bc4ea456d86f6060eab
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5776943
Reviewed-by: Khushal Sagar <khushalsagarchromium.org>
Commit-Queue: Noam Rosenthal <nrosenthalchromium.org>
Cr-Commit-Position: refs/heads/main{#1340430}

--

wpt-commits: c88a90be14eeb523b2941c994e605da1feb61e77
wpt-pr: 47568

UltraBlame original commit: 26eb8cfa4b79e31b94b703759edb04a4658ec2e5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css-view-transitions-2 View Transitions; New feature requests Needs Edits
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants