@@ -258,6 +258,23 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface;
258258 whereas others need to queue, or abort an earlier change.
259259 This is best left to a feature or framework that has a more holistic view of the application.
260260
261+ ## Rendering Model ## {#rendering-model}
262+
263+ View Transition works by replicating an element's rendered state using UA generated pseudo-elements.
264+ Aspects of the element's rendering which apply to the element itself or its descendants,
265+ for example visual effects like 'filter' or 'opacity' and clipping from 'overflow' or 'clip-path' ,
266+ are applied when generating its image in [=Capture the image=] .
267+
268+ However, properties like 'mix-blend-mode' which define how the element draws when it is embedded can't be applied to its image.
269+ Such properties are applied to the element's corresponding ''::view-transition-group()'' pseudo-element,
270+ which is meant to generate a box equivalent to the element.
271+
272+ If the ''::view-transition-group()'' has a corresponding element in the "new" states,
273+ the browser keeps the properties copied over to the ''::view-transition-group()'' in sync with the DOM element in the "new" state.
274+ If the ''::view-transition-group()'' has a corresponding both in the "old" and "new" state,
275+ and the property being copied is interpolatable,
276+ the browser also sets up a default animation to animate the property smoothly.
277+
261278## Examples ## {#examples}
262279
263280 <div class=example>
@@ -929,8 +946,7 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface;
929946 1. Set |document|'s [=active view transition=] to |transition|.
930947
931948 Note: The [=view transition=] process continues in [=setup view transition=] ,
932- via [=perform pending transition operations=] ,
933- which is called in [[#monkey-patch-to-rendering-algorithm]] .
949+ via [=perform pending transition operations=] .
934950
935951 1. Return |transition|.
936952 </div>
@@ -1140,6 +1156,12 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface;
11401156 : <dfn>old direction</dfn>
11411157 :: Null or a 'direction' , initially null.
11421158
1159+ : <dfn>old text-orientation</dfn>
1160+ :: Null or a 'text-orientation' , initially null.
1161+
1162+ : <dfn>old mix-blend-mode</dfn>
1163+ :: Null or a 'mix-blend-mode' , initially null.
1164+
11431165 : <dfn>new element</dfn>
11441166 :: an [=/element=] or null. Initially null.
11451167 </dl>
@@ -1336,6 +1358,10 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface;
13361358
13371359 1. Set |capture|'s [=captured element/old direction=] to the [=computed value=] of ' direction' on |element|.
13381360
1361+ 1. Set |capture|'s [=captured element/old text-orientation=] to the [=computed value=] of ' text-orientation' on |element|.
1362+
1363+ 1. Set |capture|'s [=captured element/old mix-blend-mode=] to the [=computed value=] of ' mix-blend-mode' on |element|.
1364+
13391365 1. Set |namedElements|[|transitionName|] to |capture|.
13401366 </div>
13411367
@@ -1714,7 +1740,7 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface;
17141740
17151741 1. [=map/For each=] |transitionName| → |capturedElement| of |transition|'s [=ViewTransition/named elements=] :
17161742
1717- 1. Let |width|, |height|, |transform|, |writingMode|, and |direction | be null.
1743+ 1. Let |width|, |height|, |transform|, |writingMode|, |direction|, |textOrientation| and |mixBlendMode | be null.
17181744
17191745 1. If |capturedElement|'s [=new element=] is null, then:
17201746
@@ -1728,6 +1754,10 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface;
17281754
17291755 1. Set |direction| to |capturedElement|'s [=captured element/old direction=] .
17301756
1757+ 1. Set |textOrientation| to |capturedElement|'s [=captured element/old text-orientation=] .
1758+
1759+ 1. Set |mixBlendMode| to |capturedElement|'s [=captured element/old mix-blend-mode=] .
1760+
17311761 1. Otherwise:
17321762
17331763 1. Return failure if any of the following conditions is true:
@@ -1749,9 +1779,13 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface;
17491779
17501780 1. Set |direction| to the [=computed value=] of 'direction' on |capturedElement|'s [=new element=] .
17511781
1782+ 1. Set |textOrientation| to the [=computed value=] of 'text-orientation' on |capturedElement|'s [=new element=] .
1783+
1784+ 1. Set |mixBlendMode| to the [=computed value=] of 'mix-blend-mode' on |capturedElement|'s [=new element=] .
1785+
17521786 1. If |capturedElement|'s [=captured element/group styles rule=] is null,
17531787 then set |capturedElement|'s [=captured element/group styles rule=] to a new {{CSSStyleRule}} representing the following CSS,
1754- and append it to |document| 's [=document/dynamic view transition style sheet=] .
1788+ and append it to |transition| 's [=relevant global object' s=] [=associated document=] 's [=document/dynamic view transition style sheet=] .
17551789
17561790 Otherwise, update |capturedElement|'s [=captured element/group styles rule=] to match the following CSS:
17571791
@@ -1763,6 +1797,8 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface;
17631797 transform: <var> transform</var> ;
17641798 writing-mode: <var> writingMode</var> ;
17651799 direction: <var> direction</var> ;
1800+ text-orientation: <var> textOrientation</var> ;
1801+ mix-blend-mode: <var> mixBlendMode</var> ;
17661802 }
17671803 </pre>
17681804
@@ -1822,6 +1858,8 @@ This appendix is <em>informative</em>.
18221858Changes from <a href="https://www.w3.org/TR/2023/WD-css-view-transitions-1-20230530/">2022-05-30 Working Draft</a>
18231859</h3>
18241860* Use a keyframe to add plus-lighter blending during cross-fade. See <a href="https://github.com/w3c/csswg-drafts/issues/8924">issue 8924</a> .
1861+ * Add mix-blend-mode to list of properties copied over to the ''::view-transition-group'' . See <a href="https://github.com/w3c/csswg-drafts/issues/8962">issue 8962</a> .
1862+ * Add text-orientation to list of properties copied over to the ''::view-transition-group'' . See <a href="https://github.com/w3c/csswg-drafts/issues/8230">issue 8230</a> .
18251863
18261864<h3 id="changes-since-2022-05-25">
18271865Changes from <a href="https://www.w3.org/TR/2023/WD-css-view-transitions-1-20230525/">2022-05-25 Working Draft</a>
0 commit comments