Skip to content

Commit

Permalink
[css-view-transitions-2] Allow auto as a keyword
Browse files Browse the repository at this point in the history
`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: w3c#8320 (comment)
Closes w3c#8320
  • Loading branch information
noamr committed Sep 19, 2024
1 parent c6b1b11 commit 60639c5
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion css-view-transitions-2/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -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 <dfn for=view-transition-name type=value>auto</dfn> 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 <css>none</css>, return null.
1. If |computed| is a <<custom-ident>>, return |computed|.
1. Assert: |computed| is <css>auto</css>.
1. If |element| has an associated [=Element/id=], then return |element|'s [=Element/id=].
1. Return a unique string, which is not a <<custom-ident>>. 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.*

Expand Down Expand Up @@ -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=].
</div>



<h2 id="priv" class="no-num">Privacy Considerations</h2>

This specification introduces no new privacy considerations.
Expand Down

0 comments on commit 60639c5

Please sign in to comment.