-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathview-transitions-api.css
63 lines (50 loc) · 930 Bytes
/
view-transitions-api.css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
@import "https://unpkg.com/open-props/easings.min.css";
@import "https://unpkg.com/open-props/animations.min.css";
body {
min-block-size: 100vh;
font-family: system-ui, sans-serif;
display: grid;
place-content: center;
place-items: center;
}
html {
color-scheme: dark light;
}
h1.container {
view-transition-name: fade;
}
@media (prefers-reduced-motion: no-preference) {
::view-transition-old(fade) {
animation:
var(--animation-fade-out),
var(--animation-scale-down);
}
::view-transition-new(fade) {
animation:
var(--animation-fade-out) reverse,
var(--animation-slide-in-up);
}
}
h1.container {
inline-size: 100vw;
font-size: 30vmin;
text-align: center;
margin: 0;
view-transition-name: fade;
}
@keyframes fade-in {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@keyframes fade-out {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}