Skip to content

Commit 8152680

Browse files
committed
Set up UA styles
1 parent 65cc54b commit 8152680

File tree

1 file changed

+19
-11
lines changed

1 file changed

+19
-11
lines changed

css-view-transitions-1/Overview.bs

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ spec:css-images-4; type:function; text:element()
3030
urlPrefix: https://wicg.github.io/navigation-api/; type: interface;
3131
text: NavigateEvent
3232
text: signal; for: NavigateEvent; url: #ref-for-dom-navigateevent-signal①
33+
urlPrefix: https://html.spec.whatwg.org/multipage/rendering.html; type: dfn;
34+
text: HTML user agent style sheet; url: #the-css-user-agent-style-sheet-and-presentational-hints
3335
</pre>
3436

3537
<style>
@@ -162,7 +164,8 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface;
162164
Note: The value <css>none</css> is invalid as a <<custom-ident>>.
163165
</dl>
164166

165-
The [=document element=] participates in a view transition by default using the following style in the [=user-agent origin=]:
167+
The [=document element=] participates in a view transition by default using the following rule,
168+
added to the [=HTML user agent style sheet=]:
166169

167170
```css
168171
html {
@@ -180,7 +183,7 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface;
180183

181184
# User-agent keyframes # {#ua-keyframes}
182185

183-
The following <<@keyframes>> are added to the [=user-agent origin=]:
186+
The following <<@keyframes>> are added to the [=HTML user agent style sheet=]:
184187

185188
```css
186189
@keyframes -ua-view-transition-fade-out {
@@ -229,7 +232,7 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface;
229232
:: This pseudo-element is the grouping container of all the other [=view-transition pseudo-elements=].
230233
Its [=originating element=] is the document's [=document element=].
231234

232-
The following [=user-agent origin=] styles apply to this element:
235+
The following is added to the [=HTML user agent style sheet=]:
233236

234237
```css
235238
html::view-transition {
@@ -248,7 +251,7 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface;
248251

249252
Its [=originating element=] is the ''::view-transition'' pseudo-element.
250253

251-
The following [=user-agent origin=] styles apply to this element:
254+
The following is added to the [=HTML user agent style sheet=]:
252255

253256
```css
254257
html::view-transition-group(*) {
@@ -264,7 +267,7 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface;
264267
<div class="note">
265268
The aim of the style is to position the element relative to its ''::view-transition'' parent.
266269

267-
In addition to above, styles in the [=user-agent origin=] animate this pseudo-element's 'width' and 'height'
270+
In addition to above, styles in the [=document/view transition style sheet=] animate this pseudo-element's 'width' and 'height'
268271
from the size of the old element's [=border box=] to that of the new element's [=border box=].
269272
Also the element's 'transform' is animated from the old element's screen space transform to the new element's screen space transform.
270273
This style is generated dynamically since the values of animated properties are determined at the time that the transition begins.
@@ -279,7 +282,7 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface;
279282

280283
Its [=originating element=] is the ''::view-transition-group()'' pseudo-element with the same transition-name.
281284

282-
The following [=user-agent origin=] styles apply to this element:
285+
The following is added to the [=HTML user agent style sheet=]:
283286

284287
```css
285288
html::view-transition-image-pair(*) {
@@ -291,7 +294,7 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface;
291294
}
292295
```
293296

294-
In addition to above, styles in the [=user-agent origin=] add ''isolation: isolate'' to this pseudo-element
297+
Note: In addition to above, styles in the [=document/view transition style sheet=] add ''isolation: isolate'' to this pseudo-element
295298
if it has both ''::view-transition-new()'' and ''::view-transition-old()'' as children.
296299

297300
Note: The aim of the style is to position the element to occupy the same space as its ''::view-transition-group()'' element
@@ -307,7 +310,7 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface;
307310

308311
Its [=originating element=] is the ''::view-transition-image-pair()'' pseudo-element with the same transition-name.
309312

310-
The following [=user-agent origin=] styles apply to this element:
313+
The following is added to the [=HTML user agent style sheet=]:
311314

312315
```css
313316
html::view-transition-old(*) {
@@ -324,13 +327,12 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface;
324327
Note: The aim of the style is to match the element's inline size while retaining the aspect ratio.
325328
It is also placed at the block start.
326329

327-
In addition to above, styles in the [=user-agent origin=] add ''mix-blend-mode: plus-lighter'' to this pseudo element
330+
Note: In addition to above, styles in the [=document/view transition style sheet=] add ''mix-blend-mode: plus-lighter'' to this pseudo element
328331
if the ancestor ''::view-transition-image-pair()'' has both ''::view-transition-new()'' and ''::view-transition-old()'' as descendants.
329332

330333
Note: ''mix-blend-mode: plus-lighter'' ensures that the blending of identical pixels from the old and new images results in the same color value as those pixels.
331334

332-
Additional [=user-agent origin=] styles added to animate these pseudo-elements
333-
are detailed in [=Animate a view transition=].
335+
Note: Additional styles in the [=document/view transition style sheet=] added to animate these pseudo-elements are detailed in [=Animate a view transition=].
334336

335337
: <dfn>::view-transition-new( <<pt-name-selector>> )</dfn>
336338
:: Identical to ''::view-transition-old()'',
@@ -444,6 +446,12 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface;
444446

445447
: <dfn>transition suppressing rendering</dfn>
446448
:: a boolean. Initially false.
449+
450+
: <dfn>view transition style sheet</dfn>
451+
:: a [=style sheet=].
452+
Initially a new [=style sheet=] in the [=user-agent origin=], ordered after the [=HTML user agent style sheet=].
453+
454+
Note: This is used to hold dynamic styles relating to transitions.
447455
</dl>
448456

449457
# API # {#api}

0 commit comments

Comments
 (0)