Skip to content

Commit

Permalink
improve comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Dosant committed Nov 23, 2022
1 parent 8d6c04c commit 1f7175b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/plugins/files/public/components/image/image.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ export const Image = ({ src, url, alt, onLoad, onError, meta, ...rest }: Props)
className={classNames(rest.className, { blurhash: currentSrc === blurhashSrc })}
css={css`
&.blurhash {
// using this animation we make blurhash to not appear instantly, but only when the original image takes a bit of time to load (>0.9s)
// Makes blurhash image visually appear after the .9s delay with a .1s transition duration.
// This is needed for a nicer UX when the original image loads fast.
animation-name: imageBlurhashFadeIn;
animation-duration: 1s;
@keyframes imageBlurhashFadeIn {
Expand Down

0 comments on commit 1f7175b

Please sign in to comment.