Skip to content

Commit 041590f

Browse files
Give defined pseudos their own heading, so they appear in TOC (#8537)
1 parent 8fb2816 commit 041590f

File tree

1 file changed

+114
-113
lines changed

1 file changed

+114
-113
lines changed

css-view-transitions-1/Overview.bs

Lines changed: 114 additions & 113 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Shortname: css-view-transitions
44
Level: 1
55
Status: WD
66
Group: csswg
7-
Date: 2022-11-24
7+
Date: 2023-03-07
88
Prepare for TR: yes
99
ED: https://drafts.csswg.org/css-view-transitions-1/
1010
TR: https://www.w3.org/TR/css-view-transitions-1/
@@ -585,155 +585,156 @@ urlPrefix: https://html.spec.whatwg.org/multipage/rendering.html; type: dfn;
585585
This enables full customization of the transition.
586586
</div>
587587

588-
: <dfn>::view-transition</dfn>
589-
::
590-
<div class=note>This element provides a containing block for all ''::view-transition-group()'' pseudo-elements.</div>
588+
### <dfn>::view-transition</dfn>
591589

592-
A [=tree-abiding pseudo-element=] that is also
593-
a [=pseudo-element root=].
594-
Its [=originating element=] is the document's [=document element=].
590+
<div class=note>This element provides a containing block for all ''::view-transition-group()'' pseudo-elements.</div>
595591

596-
Its [=containing block=] is the [=snapshot root=].
592+
A [=tree-abiding pseudo-element=] that is also
593+
a [=pseudo-element root=].
594+
Its [=originating element=] is the document's [=document element=].
597595

598-
The following is added to the [=HTML user agent style sheet=]:
596+
Its [=containing block=] is the [=snapshot root=].
599597

600-
```css
601-
html::view-transition {
602-
position: fixed;
603-
inset: 0;
604-
}
605-
```
598+
The following is added to the [=HTML user agent style sheet=]:
606599

607-
<div class="note">
608-
The aim of the style is to size the pseudo-element to cover the [=snapshot root=]
609-
and position all ''::view-transition-group()'' pseudo-elements relative to the [=snapshot root origin=].
610-
</div>
600+
```css
601+
html::view-transition {
602+
position: fixed;
603+
inset: 0;
604+
}
605+
```
611606

612-
: <dfn>::view-transition-group( <<pt-name-selector>> )</dfn>
613-
::
614-
<div class=note>
615-
This element initially mirrors the size and position of the "old" element,
616-
or the "new" element if there isn't an "old" element.
617-
It is always a [=tree/child=] of a ''::view-transition''.
607+
<div class="note">
608+
The aim of the style is to size the pseudo-element to cover the [=snapshot root=]
609+
and position all ''::view-transition-group()'' pseudo-elements relative to the [=snapshot root origin=].
610+
</div>
618611

619-
If there's both an "old" and "new" state,
620-
styles in the [=document/view transition style sheet=] animate this pseudo-element's 'width' and 'height'
621-
from the size of the old element's [=border box=] to that of the new element's [=border box=].
612+
### <dfn>::view-transition-group( <<pt-name-selector>> )</dfn>
622613

623-
Also the element's 'transform' is animated from the old element's screen space transform to the new element's screen space transform.
614+
<div class=note>
615+
This element initially mirrors the size and position of the "old" element,
616+
or the "new" element if there isn't an "old" element.
617+
It is always a [=tree/child=] of a ''::view-transition''.
624618

625-
This style is generated dynamically since the values of animated properties are determined at the time that the transition begins.
626-
</div>
619+
If there's both an "old" and "new" state,
620+
styles in the [=document/view transition style sheet=] animate this pseudo-element's 'width' and 'height'
621+
from the size of the old element's [=border box=] to that of the new element's [=border box=].
627622

628-
A [=tree-abiding pseudo-element=]
629-
that is also a [=named view-transition pseudo-element=],
630-
and [=tree/participates=] in a [=pseudo-element tree=].
623+
Also the element's 'transform' is animated from the old element's screen space transform to the new element's screen space transform.
631624

632-
It is selected from its [=ultimate originating element=], the [=document element=].
625+
This style is generated dynamically since the values of animated properties are determined at the time that the transition begins.
626+
</div>
633627

634-
The following is added to the [=HTML user agent style sheet=]:
628+
A [=tree-abiding pseudo-element=]
629+
that is also a [=named view-transition pseudo-element=],
630+
and [=tree/participates=] in a [=pseudo-element tree=].
635631

636-
```css
637-
html::view-transition-group(*) {
638-
position: absolute;
639-
top: 0;
640-
left: 0;
632+
It is selected from its [=ultimate originating element=], the [=document element=].
641633

642-
animation-duration: 0.25s;
643-
animation-fill-mode: both;
644-
}
645-
```
634+
The following is added to the [=HTML user agent style sheet=]:
646635

647-
: <dfn>::view-transition-image-pair( <<pt-name-selector>> )</dfn>
648-
::
649-
<div class=note>
650-
This element is a child of the group element and provides ''isolation: isolate'' for its children.
651-
It's needed so that its children can be blended with non-normal blend modes without affecting other visual outputs.
636+
```css
637+
html::view-transition-group(*) {
638+
position: absolute;
639+
top: 0;
640+
left: 0;
652641

653-
It is always present as a [=tree/child=] of each ''::view-transition-group()''.
654-
</div>
642+
animation-duration: 0.25s;
643+
animation-fill-mode: both;
644+
}
645+
```
655646

656-
A [=tree-abiding pseudo-element=]
657-
that is also a [=named view-transition pseudo-element=],
658-
and [=tree/participates=] in a [=pseudo-element tree=].
647+
### <dfn>::view-transition-image-pair( <<pt-name-selector>> )</dfn>
659648

660-
It is selected from its [=ultimate originating element=], the [=document element=].
649+
<div class=note>
650+
This element is a child of the group element and provides ''isolation: isolate'' for its children.
651+
It's needed so that its children can be blended with non-normal blend modes without affecting other visual outputs.
661652

662-
The following is added to the [=HTML user agent style sheet=]:
653+
It is always present as a [=tree/child=] of each ''::view-transition-group()''.
654+
</div>
663655

664-
```css
665-
html::view-transition-image-pair(*) {
666-
position: absolute;
667-
inset: 0;
656+
A [=tree-abiding pseudo-element=]
657+
that is also a [=named view-transition pseudo-element=],
658+
and [=tree/participates=] in a [=pseudo-element tree=].
668659

669-
animation-duration: inherit;
670-
animation-fill-mode: inherit;
671-
}
672-
```
660+
It is selected from its [=ultimate originating element=], the [=document element=].
661+
662+
The following is added to the [=HTML user agent style sheet=]:
663+
664+
```css
665+
html::view-transition-image-pair(*) {
666+
position: absolute;
667+
inset: 0;
673668

674-
: <dfn>::view-transition-old( <<pt-name-selector>> )</dfn>
675-
::
676-
<div class=note>
669+
animation-duration: inherit;
670+
animation-fill-mode: inherit;
671+
}
672+
```
677673

678-
This element is a replaced element that produced the visual representation of the "old" state taken from user-agent provided snapshots.
674+
### <dfn>::view-transition-old( <<pt-name-selector>> )</dfn>
679675

680-
This is only ever a [=tree/child=] of a ''::view-transition-image-pair()'',
681-
never has any [=tree/children=],
682-
and is omitted if there's no "old" state to represent.
676+
<div class=note>
683677

684-
'':only-child'' can be used to match cases where this element is the only element in the ''::view-transition-image-pair()''.
678+
This element is a replaced element that produced the visual representation of the "old" state taken from user-agent provided snapshots.
685679

686-
The appearance of this element can be manipulated with `object-*` properties in the same way that other replaced elements can be.
680+
This is only ever a [=tree/child=] of a ''::view-transition-image-pair()'',
681+
never has any [=tree/children=],
682+
and is omitted if there's no "old" state to represent.
687683

688-
</div>
684+
'':only-child'' can be used to match cases where this element is the only element in the ''::view-transition-image-pair()''.
689685

690-
A [=tree-abiding pseudo-element=]
691-
that is also a [=named view-transition pseudo-element=],
692-
and [=tree/participates=] in a [=pseudo-element tree=].
686+
The appearance of this element can be manipulated with `object-*` properties in the same way that other replaced elements can be.
693687

694-
It is selected from its [=ultimate originating element=], the [=document element=].
688+
</div>
695689

696-
It is a [=replaced element=], with [=natural dimensions=] equal to the content's size.
690+
A [=tree-abiding pseudo-element=]
691+
that is also a [=named view-transition pseudo-element=],
692+
and [=tree/participates=] in a [=pseudo-element tree=].
697693

698-
Note: The image content is captured in [=capture the image=],
699-
then set and updated in [=setup transition pseudo-elements=] and [=update pseudo-element styles=].
694+
It is selected from its [=ultimate originating element=], the [=document element=].
700695

701-
The following is added to the [=HTML user agent style sheet=]:
696+
It is a [=replaced element=], with [=natural dimensions=] equal to the content's size.
702697

703-
```css
704-
html::view-transition-old(*) {
705-
position: absolute;
706-
inset-block-start: 0;
707-
inline-size: 100%;
708-
block-size: auto;
709-
710-
animation-name: -ua-view-transition-fade-out;
711-
animation-duration: inherit;
712-
animation-fill-mode: inherit;
713-
}
714-
```
698+
Note: The image content is captured in [=capture the image=],
699+
then set and updated in [=setup transition pseudo-elements=] and [=update pseudo-element styles=].
700+
701+
The following is added to the [=HTML user agent style sheet=]:
702+
703+
```css
704+
html::view-transition-old(*) {
705+
position: absolute;
706+
inset-block-start: 0;
707+
inline-size: 100%;
708+
block-size: auto;
715709

716-
Note: The aim of the style is to match the element's inline size while retaining the aspect ratio.
717-
It is also placed at the block start.
710+
animation-name: -ua-view-transition-fade-out;
711+
animation-duration: inherit;
712+
animation-fill-mode: inherit;
713+
}
714+
```
718715

719-
Note: Additional styles in the [=document/view transition style sheet=] added to animate these pseudo-elements are detailed in [=setup transition pseudo-elements=] and [=update pseudo-element styles=].
716+
Note: The aim of the style is to match the element's inline size while retaining the aspect ratio.
717+
It is also placed at the block start.
720718

721-
: <dfn>::view-transition-new( <<pt-name-selector>> )</dfn>
722-
:: Identical to ''::view-transition-old()'',
723-
except the following styles added to the [=HTML user agent style sheet=]:
719+
Note: Additional styles in the [=document/view transition style sheet=] added to animate these pseudo-elements are detailed in [=setup transition pseudo-elements=] and [=update pseudo-element styles=].
724720

725-
```css
726-
html::view-transition-old(*) {
727-
position: absolute;
728-
inset-block-start: 0;
729-
inline-size: 100%;
730-
block-size: auto;
731-
732-
animation-name: -ua-view-transition-fade-in;
733-
animation-duration: inherit;
734-
animation-fill-mode: inherit;
735-
}
736-
```
721+
### <dfn>::view-transition-new( <<pt-name-selector>> )</dfn>
722+
723+
Identical to ''::view-transition-old()'',
724+
except the following styles added to the [=HTML user agent style sheet=]:
725+
726+
```css
727+
html::view-transition-old(*) {
728+
position: absolute;
729+
inset-block-start: 0;
730+
inline-size: 100%;
731+
block-size: auto;
732+
733+
animation-name: -ua-view-transition-fade-in;
734+
animation-duration: inherit;
735+
animation-fill-mode: inherit;
736+
}
737+
```
737738

738739
Note: The construction of this tree is performed in the [=setup transition pseudo-elements=] algorithm.
739740

0 commit comments

Comments
 (0)