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
* [css-view-transitions-1][css-view-transitions-2] Add view-transition-name: match-element
match-element works the same as auto, except doesn't try to use the ID as the
name.
Resolution: #10995 (comment)
* Add vt-1 restriction
* Update css-view-transitions-2/Overview.bs
Co-authored-by: Bramus <[email protected]>
---------
Co-authored-by: Bramus <[email protected]>
Note: Since currently only document-scoped view transitions are supported, only view transition names that are associated with the document are respected.
544
544
545
-
The values <css>none</css>and <css>auto</css> are excluded from <<custom-ident>> here.
545
+
The values <css>none</css>, <css>auto</css>, and <css>match-element</css> are excluded from <<custom-ident>> here.
546
546
547
547
Note: If this name is not unique
548
548
(i.e. if two elements simultaneously specify the same [=view transition name=])
@@ -2018,6 +2018,7 @@ Changes from <a href="https://www.w3.org/TR/2023/WD-css-view-transitions-1-20230
2018
2018
* Add a rendering characteristics note about out-of-viewport elements. See <a href="https://github.com/w3c/csswg-drafts/issues/8282">issue 8282</a>.
2019
2019
* Swap the order of invoking the update callback and setting the phase. See <a href="https://github.com/w3c/csswg-drafts/issues/10822">issue 10822</a>.
2020
2020
* Always flush the queue of update callbacks before capturing the old state. See <a href="https://github.com/w3c/csswg-drafts/issues/11292">issue 11922</a>.
2021
+
* Disallow <css>match-element</css> as a custom-ident. See <a href="https://github.com/w3c/csswg-drafts/issues/10995">Issue 10995</a>.
2021
2022
2022
2023
<h3 id="changes-since-2022-05-25">
2023
2024
Changes from <a href="https://www.w3.org/TR/2023/WD-css-view-transitions-1-20230525/">2022-05-25 Working Draft</a>
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 it 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