From 60639c5902c981f332fb901c4e71ab8dc400451a Mon Sep 17 00:00:00 2001 From: Noam Rosenthal Date: Fri, 13 Sep 2024 10:32:15 +0100 Subject: [PATCH] [css-view-transitions-2] Allow `auto` as a keyword `auto` resolves to either the element's ID, or to a unique identifier that is stable for the duration of the transition and is not web-observable. Resolution: https://github.com/w3c/csswg-drafts/issues/8320#issuecomment-2344208387 Closes #8320 --- css-view-transitions-2/Overview.bs | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/css-view-transitions-2/Overview.bs b/css-view-transitions-2/Overview.bs index 7c1e17744b0..f1666711225 100644 --- a/css-view-transitions-2/Overview.bs +++ b/css-view-transitions-2/Overview.bs @@ -755,7 +755,20 @@ div.box { # Nested view-transitions # {#nested-view-transitions} -## Overview ## {#nested-overview} +## Overview ## {#auto-name-overview} + +## Additions to 'view-transition-name' + +In addition to the existing values, the 'view-transition-name' also accepts an auto keyword. +To resolve the [=used value=] of 'view-transition-name' for |element|: + 1. Let |computed| be the [=computed value=] of 'view-transition-name'. + 1. If |computed| is none, return null. + 1. If |computed| is a <>, return |computed|. + 1. Assert: |computed| is auto. + 1. If |element| has an associated [=Element/id=], then return |element|'s [=Element/id=]. + 1. Return a unique string, which is not a <>. This string should remain consistent at least for the lifetime of |element|'s [=node document=]'s [=active view transition=]. + + Note: this string is not web-observable, and is used for addressing the element in internal algorithms. *This section is non-normative.* @@ -1170,6 +1183,8 @@ When [[css-view-transitions-1#style-transition-pseudo-elements-algorithm|updatin 1. [=Multiply=] |transform| by the inverse matrix of |groupContainerElement|'s [=transform from snapshot containing block=]. + +

Privacy Considerations

This specification introduces no new privacy considerations.