Skip to content
Source
Sign inSign up
TanStack/router
Open History to see the last commit

styles.css

106 lines2.0 KB

1@tailwind base;
2@tailwind components;
3@tailwind utilities;
4​
5html {
6 color-scheme: light dark;
7}
8* {
9 @apply border-gray-200 dark:border-gray-800;
11body {
12 @apply bg-gray-50 text-gray-950 dark:bg-gray-900 dark:text-gray-200;
14​
15/* Slide Left Transition */
16html:active-view-transition-type(slide-left) {
17 &::view-transition-old(main-content) {
18 animation: 300ms cubic-bezier(0.4, 0, 0.2, 1) both slide-out-left;
19 }
20 &::view-transition-new(main-content) {
21 animation: 300ms cubic-bezier(0.4, 0, 0.2, 1) both slide-in-left;
22 }
24​
25@keyframes slide-out-left {
26 from {
27 transform: translateX(0);
28 }
29 to {
30 transform: translateX(-100%);
31 }
33​
34@keyframes slide-in-left {
35 from {
36 transform: translateX(100%);
37 }
38 to {
39 transform: translateX(0);
40 }
42​
43/* Slide Right Transition */
44html:active-view-transition-type(slide-right) {
45 &::view-transition-old(main-content) {
46 animation: 300ms cubic-bezier(0.4, 0, 0.2, 1) both slide-out-right;
47 }
48 &::view-transition-new(main-content) {
49 animation: 300ms cubic-bezier(0.4, 0, 0.2, 1) both slide-in-right;
50 }
52​
53@keyframes slide-out-right {
54 from {
55 transform: translateX(0);
56 }
57 to {
58 transform: translateX(100%);
59 }
61​
62@keyframes slide-in-right {
63 from {
64 transform: translateX(-100%);
65 }
66 to {
67 transform: translateX(0);
68 }
70​
71/* Warp/Rotate Transition */
72html:active-view-transition-type(warp) {
73 &::view-transition-old(post) {
74 animation: 400ms ease-out both warp-out;
75 }
76​
77 &::view-transition-new(post) {
78 animation: 400ms ease-out both warp-in;
79 }
81​
82@keyframes warp-out {
83 from {
84 opacity: 1;
85 filter: blur(0) brightness(1);
86 transform: scale(1) rotate(0deg);
87 }
88 to {
89 opacity: 0;
90 filter: blur(15px) brightness(1.8);
91 transform: scale(1.1) rotate(90deg);
92 }
94​
95@keyframes warp-in {
96 from {
97 opacity: 0;
98 filter: blur(15px) brightness(1.8);
99 transform: scale(0.9) rotate(-45deg);
100 }
101 to {
102 opacity: 1;
103 filter: blur(0) brightness(1);
104 transform: scale(1) rotate(0deg);
105 }