fix: reverse post return transition

This commit is contained in:
lezi-fun committed 2026-08-12 09:34:28 +08:00
1 parent 3b4b598ce5
commit 5e9909ac7a
4 files changed
+128 -27

No files matched your search

+87 -22
View File
@@ -1151,89 +1151,154 @@ html.home-view-transition::view-transition-new(root) {
}
html.home-view-transition.returning-home::view-transition-old(root) {
animation: homeSourceFadeOut 0.24s ease-out both;
animation: returnPostSurroundingsOut 0.24s 0.16s ease-out both;
}
html.home-view-transition.returning-home::view-transition-new(root) {
animation: homeFeedFadeIn 0.32s ease-out both;
animation: returnFeedReveal 0.28s 0.34s ease-out both;
}
html.home-view-transition.returning-home::view-transition-group(post-expand) {
animation-duration: 0.48s;
animation-duration: 0.96s;
animation-timing-function: cubic-bezier(0.42, 0, 0.58, 1);
}
html.home-view-transition.returning-home::view-transition-group(post-sidebar) {
animation-duration: 0.72s;
animation-delay: 0.24s;
animation-fill-mode: both;
animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}
html.home-view-transition.returning-home::view-transition-group(post-heading) {
animation-duration: 0.64s;
animation-delay: 0.32s;
animation-fill-mode: both;
animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}
html.home-view-transition.returning-home::view-transition-group(post-time) {
animation-duration: 0.96s;
animation-fill-mode: both;
animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}
html.home-view-transition.returning-home::view-transition-group(post-sidebar),
html.home-view-transition.returning-home::view-transition-group(post-heading),
html.home-view-transition.returning-home::view-transition-group(post-time),
html.home-view-transition.returning-home::view-transition-group(post-avatar),
html.home-view-transition.returning-home::view-transition-group(post-author),
html.home-view-transition.returning-home::view-transition-group(post-body),
html.home-view-transition.returning-home::view-transition-group(post-pin-state),
html.home-view-transition.returning-home::view-transition-group(post-edited-state) {
animation-duration: 0.48s;
animation-duration: 0.68s;
animation-delay: 0.28s;
animation-fill-mode: both;
animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}
html.home-view-transition.returning-home::view-transition-old(post-expand) {
animation: postDetailCollapse 0.24s 0.12s ease-out both;
animation: none;
width: 100%;
height: 100%;
opacity: 1;
object-fit: fill;
mix-blend-mode: normal;
}
html.home-view-transition.returning-home::view-transition-new(post-expand) {
animation: postCardFadeIn 0.24s 0.18s ease-out both;
animation: none;
width: 100%;
height: 100%;
opacity: 0;
mix-blend-mode: normal;
}
html.home-view-transition.returning-home::view-transition-old(post-heading) {
animation: sharedTitleMorphOut 0.42s ease-out both;
animation: returnSharedPartOut 0.24s 0.32s ease-out both;
}
html.home-view-transition.returning-home::view-transition-new(post-heading) {
animation: sharedTitleMorphIn 0.42s ease-out both;
animation: returnSharedPartIn 0.24s 0.32s ease-out both;
}
html.home-view-transition.returning-home::view-transition-old(post-time) {
animation: returnSharedPartOut 0.2s 0.47s ease-out both;
}
html.home-view-transition.returning-home::view-transition-new(post-time) {
animation: returnSharedPartIn 0.2s 0.47s ease-out both;
}
html.home-view-transition.returning-home::view-transition-old(post-time),
html.home-view-transition.returning-home::view-transition-old(post-sidebar) {
animation: sharedTimeOut 0.14s 0.24s ease-out both;
animation: sharedSidebarIn 0.2s 0.34s ease-out reverse both;
}
html.home-view-transition.returning-home::view-transition-new(post-time),
html.home-view-transition.returning-home::view-transition-new(post-sidebar) {
animation: sharedTimeIn 0.14s 0.26s ease-out both;
animation: sharedSidebarOut 0.2s 0.34s ease-out reverse both;
}
html.home-view-transition.returning-home::view-transition-old(post-avatar),
html.home-view-transition.returning-home::view-transition-old(post-author),
html.home-view-transition.returning-home::view-transition-old(post-pin-state),
html.home-view-transition.returning-home::view-transition-old(post-edited-state) {
animation: sharedPartMorphOut 0.42s ease-out both;
animation: returnSharedPartOut 0.22s 0.28s ease-out both;
}
html.home-view-transition.returning-home::view-transition-new(post-avatar),
html.home-view-transition.returning-home::view-transition-new(post-author),
html.home-view-transition.returning-home::view-transition-new(post-pin-state),
html.home-view-transition.returning-home::view-transition-new(post-edited-state) {
animation: sharedPartMorphIn 0.42s ease-out both;
animation: returnSharedPartIn 0.22s 0.28s ease-out both;
}
html.home-view-transition.returning-home::view-transition-old(post-detail-controls),
html.home-view-transition.returning-home::view-transition-old(post-detail-signature),
html.home-view-transition.returning-home::view-transition-old(post-detail-media) {
animation: feedOnlyPartOut 0.18s ease-out both;
animation: returnDetailOnlyPartOut 0.22s 0.12s ease-out both;
}
html.home-view-transition.returning-home::view-transition-new(post-feed-actions),
html.home-view-transition.returning-home::view-transition-new(post-feed-media) {
animation: detailOnlyPartIn 0.18s 0.26s ease-out both;
animation: returnFeedOnlyPartIn 0.28s 0.44s ease-out both;
}
html.home-view-transition.returning-home::view-transition-old(post-body) {
animation: bodySourceOut 0.1s 0.35s ease-out both;
animation: none;
opacity: 1;
object-fit: none;
object-position: left top;
}
html.home-view-transition.returning-home::view-transition-new(post-body) {
animation: bodyTargetIn 0.1s 0.38s ease-out both;
animation: none;
opacity: 0;
}
@keyframes returnPostSurroundingsOut {
from { opacity: 1; }
to { opacity: 0; }
}
@keyframes returnFeedReveal {
from { opacity: 0; }
to { opacity: 1; }
}
@keyframes returnSharedPartOut {
from { opacity: 1; }
to { opacity: 0; }
}
@keyframes returnSharedPartIn {
from { opacity: 0; }
to { opacity: 1; }
}
@keyframes returnDetailOnlyPartOut {
from { opacity: 1; }
to { opacity: 0; }
}
@keyframes returnFeedOnlyPartIn {
from { opacity: 0; }
to { opacity: 1; }
}
@keyframes feedViewFadeOut {