You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With ''view-transition-name/auto'', this CSS would work:
794
+
With ''view-transition-name/auto'' or ''view-transition-name/match-element'', this CSS would work:
795
795
796
796
```css
797
797
li {
798
798
view-transition-name: auto;
799
+
/* or */
800
+
view-transition-name: match-element;
799
801
}
800
802
```
803
+
804
+
The ''view-transition-name/auto'' and ''view-transition-name/match-element'' keywords have a minor
805
+
difference, where ''view-transition-name/auto'' would use the element's [=Element/id=] as the 'view-transition-name'
806
+
if exists, making it potentially work across documents, while ''view-transition-name/match-element'' only matches
807
+
based on element identity.
801
808
</div>
802
809
803
810
## Additions to 'view-transition-name' ## {#additions-to-vt-name}
@@ -807,8 +814,8 @@ To resolve the [=used value=] of 'view-transition-name' for |element|:
807
814
1. Let |computed| be the [=computed value=] of 'view-transition-name'.
808
815
1. If |computed| is <css>none</css>, return null.
809
816
1. If |computed| is a <<custom-ident>>, return |computed|.
810
-
1. Assert: |computed| is <css>auto</css>.
811
-
1. If |element| has an associated [=Element/id=], and |computed| is associated with the same [=tree/root=] as |element|'s [=tree/root=], then return the value of |element|'s [=Element/id=].
817
+
1. Assert: |computed| is <css>auto</css> or <css>match-element</css>.
818
+
1. If |computed| is <css>auto</css>, |element| has an associated [=Element/id=], and |computed| is associated with the same [=tree/root=] as |element|'s [=tree/root=], then return the value of |element|'s [=Element/id=].
812
819
813
820
Note: this means that a ''::part()'' pseudo-element wouldn't resolve to its matching element's [=Element/id=].
0 commit comments