simplify placeholder animation
This commit is contained in:
parent
cac767a3b8
commit
076f8a116b
3 changed files with 9 additions and 17 deletions
|
@ -76,7 +76,7 @@ class FileCard extends React.PureComponent<Props> {
|
|||
|
||||
if ((!claim && !pending) || placeholder) {
|
||||
return (
|
||||
<li className="media-card media--placeholder small">
|
||||
<li className="media-card media--placeholder">
|
||||
<div className="media__thumb media__thumb--placeholder" />
|
||||
<div className="media__title media__title--placeholder" />
|
||||
<div className="media__channel media__channel--placeholder" />
|
||||
|
|
|
@ -374,10 +374,14 @@
|
|||
@include thumbnail;
|
||||
|
||||
&:not(.media__thumb--nsfw):not(.media__thumb--placeholder) {
|
||||
background-color: $lbry-black;
|
||||
background-color: $lbry-gray-2;
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
|
||||
html[data-theme='dark'] & {
|
||||
background-color: rgba($lbry-white, 0.1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -33,23 +33,11 @@
|
|||
}
|
||||
|
||||
@mixin placeholder {
|
||||
animation-duration: 4s;
|
||||
animation-fill-mode: forwards;
|
||||
animation-iteration-count: infinite;
|
||||
animation-name: loading-animation;
|
||||
animation-timing-function: linear;
|
||||
background-color: transparent;
|
||||
background-image: linear-gradient(to right, $lbry-gray-3 10%, transparent 80%, $lbry-gray-3 100%);
|
||||
background-repeat: repeat;
|
||||
background-size: 500px;
|
||||
animation: pulse 2s infinite ease-in-out;
|
||||
background-color: $lbry-gray-2;
|
||||
|
||||
html[data-theme='dark'] & {
|
||||
background-image: linear-gradient(
|
||||
to right,
|
||||
rgba($lbry-white, 0.1) 10%,
|
||||
transparent 80%,
|
||||
rgba($lbry-white, 0.1) 100%
|
||||
);
|
||||
background-color: rgba($lbry-white, 0.1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue