Skip to content

Commit

Permalink
livephoto: make animation less annoying
Browse files Browse the repository at this point in the history
Signed-off-by: Varun Patil <varunpatil@ucla.edu>
  • Loading branch information
pulsejet committed Mar 15, 2023
1 parent dab5757 commit 1ef3f57
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/components/frame/Photo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ div.img-outer {
-webkit-tap-highlight-color: transparent;
-webkit-touch-callout: none;
user-select: none;
transition: border-radius 0.1s ease-in, var(--livephoto-img-transition);
transition: border-radius 0.1s ease-in;
.p-outer.placeholder > & {
display: none;
Expand Down
15 changes: 4 additions & 11 deletions src/global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,6 @@ body.has-viewer header {
}

// Live Photo transitions
:root {
--livephoto-img-transition: opacity 0.4s linear, transform 0.3s ease-in-out;
}
.memories-livephoto {
position: relative;
overflow: hidden;
Expand All @@ -73,20 +70,16 @@ body.has-viewer header {
width: 100%;
height: 100%;
display: block;
transition: var(--livephoto-img-transition);
z-index: 1;
}

video,
&.playing.canplay img {
video {
opacity: 0;
z-index: 2;
transition: opacity 0.3s ease-in-out;
}
img,
&.playing.canplay video {
opacity: 1;
}
&.playing.canplay img {
transform: scale(1.05);
}
}

// Hide scrollbar
Expand Down

0 comments on commit 1ef3f57

Please # to comment.