mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-03-11 21:27:05 +00:00
fix: make screen switching animation feel smoother
This commit is contained in:
parent
89b6526555
commit
85407cfd3e
2 changed files with 37 additions and 3 deletions
|
|
@ -6,13 +6,29 @@
|
|||
}
|
||||
|
||||
animation-timing-function: ease-in-out;
|
||||
animation-duration: 100ms;
|
||||
animation-duration: 350ms;
|
||||
|
||||
@media (prefers-reduced-motion) {
|
||||
:local {
|
||||
animation-name: fade-in-no-motion;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes fade-in {
|
||||
0% {
|
||||
opacity: 0;
|
||||
transform: translateY(4px);
|
||||
}
|
||||
|
||||
40% {
|
||||
opacity: 0;
|
||||
transform: translateY(4px);
|
||||
}
|
||||
|
||||
70% {
|
||||
opacity: 0.6;
|
||||
transform: translateY(0.2vh);
|
||||
transform: translateY(2px);
|
||||
}
|
||||
|
||||
100% {
|
||||
|
|
@ -51,4 +67,22 @@
|
|||
|
||||
.slide-left-exit {
|
||||
transform: translateX(100%);
|
||||
}
|
||||
|
||||
@keyframes fade-in-no-motion {
|
||||
0% {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
40% {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
70% {
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
100% {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
|
@ -143,7 +143,7 @@ const MetaDetails = ({ urlParams, queryParams }) => {
|
|||
:
|
||||
<React.Fragment>
|
||||
<MetaPreview
|
||||
className={classnames(styles['meta-preview'], 'animation-fade-in')}
|
||||
className={classnames(styles['meta-preview'])}
|
||||
name={metaDetails.metaItem.content.content.name}
|
||||
logo={metaDetails.metaItem.content.content.logo}
|
||||
runtime={metaDetails.metaItem.content.content.runtime}
|
||||
|
|
|
|||
Loading…
Reference in a new issue